Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for opensearch searchable snapshot metrics #860

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

etgraylog
Copy link

@etgraylog etgraylog commented Feb 23, 2024

Description

Elasticsearch & Opensearch both have a Searchable Snapshots feature that emit metrics from unique API endpoints:

The Elasticsearch Searchable Snapshots metrics appear to be available via the es.snapshots argument, while there does not yet appear to be a similar argument for Opensearch Searchable Snapshot metrics.

A minimal amount of changes were realized to add support for these metrics, leveraging existing structs & other data types with a new node role while adding necessary elements to for example nodeMetrics (collector/nodes.go).

Motivation and Context

The motivation of this PR is to add support for Opensearch Searchable Snapshots to the elasticsearch_exporter so that they can be scraped by Prometheus for monitoring & serviceability.

Several modifications have been made in a fork to quickly add support for these. A better way to emit these more than likely exists so that for example only nodes with es_search_node=true would be collected. Moreover, adding a CLI argument to enable these metrics as they are not applicable to Elasticsearch. The changes in this PR could be a decent starting place however if not at least found useful by others.

Details

The proposed changes add 8x new metrics to the collection from the Opensearch Nodes API:

Metric name Metric type
elasticsearch_filecache_active_in_bytes Gauge
elasticsearch_filecache_active_percent Gauge
elasticsearch_filecache_evictions_in_bytes Gauge
elasticsearch_filecache_hit_count Gauge
elasticsearch_filecache_miss_count Gauge
elasticsearch_filecache_total_in_bytes Gauge
elasticsearch_filecache_used_in_bytes Gauge
elasticsearch_filecache_used_percent Gauge

Signed-off-by: etgraylog <evan.tepsic@graylog.com>
Signed-off-by: etgraylog <evan.tepsic@graylog.com>
Signed-off-by: etgraylog <evan.tepsic@graylog.com>
…trics

Signed-off-by: etgraylog <evan.tepsic@graylog.com>
Signed-off-by: etgraylog <evan.tepsic@graylog.com>
Signed-off-by: etgraylog <evan.tepsic@graylog.com>
Signed-off-by: etgraylog <evan.tepsic@graylog.com>
Signed-off-by: etgraylog <evan.tepsic@graylog.com>
Signed-off-by: etgraylog <evan.tepsic@graylog.com>
Signed-off-by: etgraylog <evan.tepsic@graylog.com>
Signed-off-by: etgraylog <evan.tepsic@graylog.com>
Signed-off-by: etgraylog <evan.tepsic@graylog.com>
@etgraylog etgraylog force-pushed the add-opensearch-searchable-snapshot-filecache branch from e80b455 to 10c519a Compare February 23, 2024 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant