Operations
The L1ES plugin expands compact events at search time on self-hosted Elasticsearch 8.17.0 and OpenSearch 2.19.0. Monitoring its health in production, backup and disaster recovery for plugin indices, and safe rolling upgrades with version-pinned plugins.
How do I monitor L1ES plugin health in production
Health check endpoint:
Expected response:
{
"name": "l1es-plugin",
"description": "Log10x support for searching and decoding encoded data in Elasticsearch",
"version": {
"l1es": "1.0.1",
"l1es-snapshot": "1.0.1.es.8.17.0",
"elasticsearch": "8.17.0"
}
}
Set up Elasticsearch Watcher alert (Kibana):
POST _watcher/watch/l1es_plugin_health
{
"trigger": { "schedule": { "interval": "5m" } },
"input": {
"http": {
"request": {
"url": "http://localhost:9200/_l1es",
"method": "GET"
}
}
},
"condition": {
"compare": { "ctx.payload.version.l1es": { "eq": null } }
},
"actions": {
"notify_team": {
"email": {
"to": "ops@company.com",
"subject": "L1ES Plugin Health Alert"
}
}
}
}
Monitor template index health:
Backup and disaster recovery for L1ES plugin
Monthly backup procedure:
L1ES stores two critical indices: templates and field mappings.
# Both indices can hold more than one page of documents, so each search is
# scrolled to its end and every hit is written as a bulk action line plus its
# source, ready for _bulk. Needs curl and jq.
scroll_dump() { # scroll_dump <index> <outfile>
local resp scroll_id
resp=$(curl -s -X POST "localhost:9200/$1/_search?scroll=5m" \
-H "Content-Type: application/json" \
-d '{"size": 1000, "query": {"match_all": {}}}')
: > "$2"
while [ "$(echo "$resp" | jq '.hits.hits | length')" -gt 0 ]; do
echo "$resp" | jq -c --arg idx "$1" \
'.hits.hits[] | {"index": {"_index": $idx, "_id": ._id}}, ._source' >> "$2"
scroll_id=$(echo "$resp" | jq -r '._scroll_id')
resp=$(curl -s -X POST "localhost:9200/_search/scroll" \
-H "Content-Type: application/json" \
-d "{\"scroll\": \"5m\", \"scroll_id\": \"$scroll_id\"}")
done
curl -s -o /dev/null -X DELETE "localhost:9200/_search/scroll" \
-H "Content-Type: application/json" \
-d "{\"scroll_id\": \"$scroll_id\"}"
}
# Backup 1: Templates (monthly)
scroll_dump l1es_dml templates_backup_$(date +%Y%m%d).ndjson
# Backup 2: Field mappings (monthly)
scroll_dump l1es_dml_indices mappings_backup_$(date +%Y%m%d).ndjson
# Store in S3 or backup system
aws s3 cp templates_backup_*.ndjson s3://my-backups/l1es/
aws s3 cp mappings_backup_*.ndjson s3://my-backups/l1es/
Recovery: l1es_dml index deleted
-
Check what's lost:
-
Restore from backup:
# The plugin creates its two indices together: cleanup removes the one # still present (it reports an error for the one already gone), setup # creates both with the plugin's mappings, and the two backups load back. curl -X POST "localhost:9200/_l1es/cleanup" curl -X POST "localhost:9200/_l1es/setup" curl -X POST "localhost:9200/_bulk" \ -H "Content-Type: application/x-ndjson" \ --data-binary @templates_backup_20260227.ndjson curl -X POST "localhost:9200/_bulk" \ -H "Content-Type: application/x-ndjson" \ --data-binary @mappings_backup_20260227.ndjson # One request body is limited by http.max_content_length (100 MB as # shipped); split a larger file (split -l 20000) and send each part -
Verify restoration:
Impact during recovery: Queries return compact events unexpanded until the templates are restored. Restore time scales with the template count and your cluster's bulk-load throughput.
Recovery: l1es_dml_indices deleted
-
Re-register field mappings:
-
Verify:
Impact: Expansion stops for that index until re-registered. Recovery is immediate (< 1 second).
Rolling upgrade: Elasticsearch version bump with L1ES plugin
For a 3-node Elasticsearch cluster upgrade (e.g., 8.16 → 8.17): the steps follow Elastic's rolling upgrade procedure, which upgrades data nodes first and master-eligible nodes last, with the plugin step added.
# Step 1: Allow primary shards only, so no shard is rebalanced while a node is down
PUT _cluster/settings
{
"persistent": {
"cluster.routing.allocation.enable": "primaries"
}
}
# Step 2: Stop non-essential indexing and flush (optional)
POST _flush
# Step 3: Stop node 1 and upgrade it
# (On node 1)
sudo systemctl stop elasticsearch.service
# Upgrade the Elasticsearch package
# (e.g., apt upgrade elasticsearch)
# Install the L1ES build for the new Elasticsearch version; every plugin
# is upgraded with the node
bin/elasticsearch-plugin remove l1es-plugin
bin/elasticsearch-plugin install file:///path/to/l1es-plugin-1.0.1.es.8.17.0.zip
# Start node 1
sudo systemctl start elasticsearch.service
# Step 4: Confirm node 1 rejoined the cluster
GET _cat/nodes?h=ip,name,version&v=true
# Step 5: Re-enable shard allocation once the node is back
PUT _cluster/settings
{
"persistent": {
"cluster.routing.allocation.enable": null
}
}
# Step 6: Wait for shard allocation to finish before the next node
GET _cat/health?v=true
# Wait for status to reach green. The cluster is yellow while allocation is
# limited to primaries and turns green only after Step 5. When a replica
# cannot be assigned, go on once no shard is initializing or relocating.
# Repeat for nodes 2 and 3
Each plugin build matches one Elasticsearch version
Each plugin build is compiled against an exact Elasticsearch/OpenSearch version. An ES 8.17.0 plugin loads on ES 8.17.0 only; 8.16.x and 8.18.x reject it.
| L1ES | Elasticsearch | OpenSearch | Java | Lucene |
|---|---|---|---|---|
| 1.0.1 | 8.17.0 | 2.19.0 | 17+ | 9.12.0 |
On a plugin version mismatch:
- The plugin fails to load with a Plugin version mismatch error (or UnsupportedClassVersionError on the wrong Java version)
- Always install the plugin build matching your ES/OS version exactly before starting the node