Skip to content

Commit

Permalink
add metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
anton.voskresensky committed Sep 4, 2024
1 parent 9603e09 commit 9bff5eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions collector/cluster-settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ func (c *ClusterSettingsCollector) Collect(ch chan<- prometheus.Metric) {
ch <- prometheus.MustNewConstMetric(c.excludeExists, prometheus.CounterValue, 0, "transient")
}

path = "persistent.routing.allocation.total_shards_per_node"
path = "persistent.cluster..routing.allocation.total_shards_per_node"
if _, ok := walk(settings, path); ok {
ch <- prometheus.MustNewConstMetric(c.totalShardsPerNodeExists, prometheus.CounterValue, 1, "persistent")
} else {
ch <- prometheus.MustNewConstMetric(c.totalShardsPerNodeExists, prometheus.CounterValue, 0, "persistent")
}

path = "transient.routing.allocation.total_shards_per_node"
path = "transient.cluster.routing.allocation.total_shards_per_node"
if _, ok := walk(settings, path); ok {
ch <- prometheus.MustNewConstMetric(c.totalShardsPerNodeExists, prometheus.CounterValue, 1, "transient")
} else {
Expand Down

0 comments on commit 9bff5eb

Please sign in to comment.