Skip to content

Commit e7fe7a3

Browse files
authored
Add missing documentation for ILM metrics (#892)
* Add missing documentation for ILM metrics Signed-off-by: Jonathan Ballet <jon@multani.info> * Document the --es.ilm flag Signed-off-by: Jonathan Ballet <jon@multani.info> * Apply suggestions from code review Signed-off-by: Jonathan Ballet <jon@multani.info> --------- Signed-off-by: Jonathan Ballet <jon@multani.info>
1 parent b550e54 commit e7fe7a3

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ elasticsearch_exporter --help
5757
| es.indices_settings | 1.0.4rc1 | If true, query settings stats for all indices in the cluster. | false |
5858
| es.indices_mappings | 1.2.0 | If true, query stats for mappings of all indices of the cluster. | false |
5959
| es.aliases | 1.0.4rc1 | If true, include informational aliases metrics. | true |
60+
| es.ilm | 1.6.0 | If true, query index lifecycle policies for indices in the cluster.
6061
| es.shards | 1.0.3rc1 | If true, query stats for all indices in the cluster, including shard-level stats (implies `es.indices=true`). | false |
6162
| collector.snapshots | 1.0.4rc1 | If true, query stats for the cluster snapshots. (As of v1.7.0, this flag has replaced "es.snapshots"). | false |
6263
| es.slm | | If true, query stats for SLM. | false |
@@ -142,6 +143,8 @@ Further Information
142143
| elasticsearch_filesystem_io_stats_device_write_operations_count | gauge | 1 | Count of disk write operations |
143144
| elasticsearch_filesystem_io_stats_device_read_size_kilobytes_sum | gauge | 1 | Total kilobytes read from disk |
144145
| elasticsearch_filesystem_io_stats_device_write_size_kilobytes_sum | gauge | 1 | Total kilobytes written to disk |
146+
| elasticsearch_ilm_status | gauge | 1 | Current status of ILM. Status can be `STOPPED`, `RUNNING`, `STOPPING`. |
147+
| elasticsearch_ilm_index_status | gauge | 4 | Status of ILM policy for index |
145148
| elasticsearch_indices_active_queries | gauge | 1 | The number of currently active queries |
146149
| elasticsearch_indices_docs | gauge | 1 | Count of documents on this node |
147150
| elasticsearch_indices_docs_deleted | gauge | 1 | Count of deleted documents on this node |

collector/ilm_status.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func NewIlmStatus(logger *slog.Logger, client *http.Client, url *url.URL) *IlmSt
6262
Type: prometheus.GaugeValue,
6363
Desc: prometheus.NewDesc(
6464
prometheus.BuildFQName(namespace, subsystem, "status"),
65-
"Current status of ilm. Status can be STOPPED, RUNNING, STOPPING.",
65+
"Current status of ILM. Status can be STOPPED, RUNNING, STOPPING.",
6666
[]string{"operation_mode"}, nil,
6767
),
6868
Value: func(ilm *IlmStatusResponse, status string) float64 {

collector/ilm_status_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func TestILMStatus(t *testing.T) {
3939
name: "6.6.0",
4040
file: "../fixtures/ilm_status/6.6.0.json",
4141
want: `
42-
# HELP elasticsearch_ilm_status Current status of ilm. Status can be STOPPED, RUNNING, STOPPING.
42+
# HELP elasticsearch_ilm_status Current status of ILM. Status can be STOPPED, RUNNING, STOPPING.
4343
# TYPE elasticsearch_ilm_status gauge
4444
elasticsearch_ilm_status{operation_mode="RUNNING"} 1
4545
elasticsearch_ilm_status{operation_mode="STOPPED"} 0

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func main() {
8282
"Export informational alias metrics.").
8383
Default("true").Bool()
8484
esExportILM = kingpin.Flag("es.ilm",
85-
"Export index lifecycle politics for indices in the cluster.").
85+
"Export index lifecycle policies for indices in the cluster.").
8686
Default("false").Bool()
8787
esExportShards = kingpin.Flag("es.shards",
8888
"Export stats for shards in the cluster (implies --es.indices).").

0 commit comments

Comments
 (0)