diff --git a/README.md b/README.md index ec2d244a..7cbe820c 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,7 @@ elasticsearch_exporter --help | es.indices_settings | 1.0.4rc1 | If true, query settings stats for all indices in the cluster. | false | | es.indices_mappings | 1.2.0 | If true, query stats for mappings of all indices of the cluster. | false | | es.aliases | 1.0.4rc1 | If true, include informational aliases metrics. | true | +| es.ilm | 1.6.0 | If true, query index lifecycle policies for indices in the cluster. | es.shards | 1.0.3rc1 | If true, query stats for all indices in the cluster, including shard-level stats (implies `es.indices=true`). | false | | es.snapshots | 1.0.4rc1 | If true, query stats for the cluster snapshots. | false | | es.slm | | If true, query stats for SLM. | false | @@ -139,6 +140,8 @@ Further Information | elasticsearch_filesystem_io_stats_device_write_operations_count | gauge | 1 | Count of disk write operations | | elasticsearch_filesystem_io_stats_device_read_size_kilobytes_sum | gauge | 1 | Total kilobytes read from disk | | elasticsearch_filesystem_io_stats_device_write_size_kilobytes_sum | gauge | 1 | Total kilobytes written to disk | +| elasticsearch_ilm_status | gauge | 3 | Current status of ILM. Status can be `STOPPED`, `RUNNING`, `STOPPING`. | +| elasticsearch_ilm_index_status | gauge | | Status of ILM policy for index | | elasticsearch_indices_active_queries | gauge | 1 | The number of currently active queries | | elasticsearch_indices_docs | gauge | 1 | Count of documents on this node | | elasticsearch_indices_docs_deleted | gauge | 1 | Count of deleted documents on this node | diff --git a/collector/ilm_status.go b/collector/ilm_status.go index 57fda408..e1630e6c 100644 --- a/collector/ilm_status.go +++ b/collector/ilm_status.go @@ -63,7 +63,7 @@ func NewIlmStatus(logger log.Logger, client *http.Client, url *url.URL) *IlmStat Type: prometheus.GaugeValue, Desc: prometheus.NewDesc( prometheus.BuildFQName(namespace, subsystem, "status"), - "Current status of ilm. Status can be STOPPED, RUNNING, STOPPING.", + "Current status of ILM. Status can be STOPPED, RUNNING, STOPPING.", []string{"operation_mode"}, nil, ), Value: func(ilm *IlmStatusResponse, status string) float64 { diff --git a/collector/ilm_status_test.go b/collector/ilm_status_test.go index 56254ba9..ede82ddd 100644 --- a/collector/ilm_status_test.go +++ b/collector/ilm_status_test.go @@ -39,7 +39,7 @@ func TestILMStatus(t *testing.T) { name: "6.6.0", file: "../fixtures/ilm_status/6.6.0.json", want: ` -# HELP elasticsearch_ilm_status Current status of ilm. Status can be STOPPED, RUNNING, STOPPING. +# HELP elasticsearch_ilm_status Current status of ILM. Status can be STOPPED, RUNNING, STOPPING. # TYPE elasticsearch_ilm_status gauge elasticsearch_ilm_status{operation_mode="RUNNING"} 1 elasticsearch_ilm_status{operation_mode="STOPPED"} 0 diff --git a/main.go b/main.go index 5e4c6da0..0ca6b6cf 100644 --- a/main.go +++ b/main.go @@ -78,7 +78,7 @@ func main() { "Export informational alias metrics."). Default("true").Bool() esExportILM = kingpin.Flag("es.ilm", - "Export index lifecycle politics for indices in the cluster."). + "Export index lifecycle policies for indices in the cluster."). Default("false").Bool() esExportShards = kingpin.Flag("es.shards", "Export stats for shards in the cluster (implies --es.indices).").