Skip to content

Commit

Permalink
feat: add support for _health_report
Browse files Browse the repository at this point in the history
In elasticsearch 8.7 a new endpoint for cluster health has been added. See https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-health-report

Signed-off-by: Richard Klose <[email protected]>
  • Loading branch information
richardklose committed Feb 24, 2025
1 parent 05609ff commit 6a0bb0e
Show file tree
Hide file tree
Showing 4 changed files with 758 additions and 0 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ elasticsearch_exporter --help
| 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 |
| 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 |
| collector.health-report | 1.9.0 | If true, query the health report (requires elasticsearch 8.7.0 or later) | false |
| es.slm | | If true, query stats for SLM. | false |
| es.data_stream | | If true, query state for Data Steams. | false |
| es.timeout | 1.0.2 | Timeout for trying to get stats from Elasticsearch. (ex: 20s) | 5s |
Expand Down Expand Up @@ -270,6 +271,31 @@ Further Information
| elasticsearch_data_stream_stats_json_parse_failures | counter | 0 | Number of parsing failures for Data Stream stats |
| elasticsearch_data_stream_backing_indices_total | gauge | 1 | Number of backing indices for Data Stream |
| elasticsearch_data_stream_store_size_bytes | gauge | 1 | Current size of data stream backing indices in bytes |
| elasticsearch_health_report_creating_primaries | gauge | 1 | The number of creating primary shards |
| elasticsearch_health_report_creating_replicas | gauge | 1 | The number of creating replica shards |
| elasticsearch_health_report_data_stream_lifecycle_status | gauge | 1 | Data stream lifecycle status |
| elasticsearch_health_report_disk_status | gauge | 3 | disk status |
| elasticsearch_health_report_ilm_policies | gauge | 1 | The number of ILM Policies |
| elasticsearch_health_report_ilm_stagnating_indices | gauge | 1 | The number of stagnating indices |
| elasticsearch_health_report_ilm_status | gauge | 3 | ILM status |
| elasticsearch_health_report_initializing_primaries | gauge | 1 | The number of initializing primary shards |
| elasticsearch_health_report_initializing_replicas | gauge | 1 | The number of initializing replica shards |
| elasticsearch_health_report_master_is_stable_status | gauge | 3 | Master is stable status |
| elasticsearch_health_report_max_shards_in_cluster_data | gauge | 1 | The number of maximum shards in a cluster |
| elasticsearch_health_report_max_shards_in_cluster_frozen | gauge | 1 | The number of maximum frozen shards in a cluster |
| elasticsearch_health_report_repository_integrity_status | gauge | 3 | Repository integrity status |
| elasticsearch_health_report_restarting_primaries | gauge | 1 | The number of restarting primary shards |
| elasticsearch_health_report_restarting_replicas | gauge | 1 | The number of restarting replica shards |
| elasticsearch_health_report_shards_availabilty_status | gauge | 3 | Shards availabilty status |
| elasticsearch_health_report_shards_capacity_status | gauge | 3 | Shards capacity status |
| elasticsearch_health_report_slm_policies | gauge | 1 | The number of SLM policies |
| elasticsearch_health_report_slm_status | gauge | 3 | SLM status |
| elasticsearch_health_report_started_primaries | gauge | 1 | The number of started primary shards |
| elasticsearch_health_report_started_replicas | gauge | 1 | The number of started replica shards |
| elasticsearch_health_report_status | gauge | 3 | Overall cluster status |
| elasticsearch_health_report_total_repositories | gauge | 1 | The number snapshot repositories |
| elasticsearch_health_report_unassigned_primaries | gauge | 1 | The number of unassigned primary shards |
| elasticsearch_health_report_unassigned_replicas | gauge | 1 | The number of unassigned replica shards |

### Alerts & Recording Rules

Expand Down
Loading

0 comments on commit 6a0bb0e

Please sign in to comment.