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

Clean Up Snapshot Metrics and Labels #786

Open
sysadmind opened this issue Oct 10, 2023 · 0 comments
Open

Clean Up Snapshot Metrics and Labels #786

sysadmind opened this issue Oct 10, 2023 · 0 comments

Comments

@sysadmind
Copy link
Contributor

The labels on the snapshot collector are confusing and need to be cleaned up. The labels match on most of the metrics, but in some cases they contradict the metric itself.

For example:

# HELP elasticsearch_snapshot_stats_snapshot_failed_shards Last snapshot failed shards
# TYPE elasticsearch_snapshot_stats_snapshot_failed_shards gauge
elasticsearch_snapshot_stats_snapshot_failed_shards{repository="test1",state="SUCCESS",version="5.4.2"} 1

The label state=SUCCESS does not make sense for a metric about failed shards. In this case, the HELP is not very helpful and could be more descriptive.

The default labels are defined by this func: https://github.com/prometheus-community/elasticsearch_exporter/blob/master/collector/snapshots.go#L45. This means that the state label is the overall state of the snapshot repository. That can be a metric all by itself, removing the need to put the label on every metric.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant