Skip to content

Commit

Permalink
Revert "feat: report ElasticCloud data tiers nodes roles (prometheus-…
Browse files Browse the repository at this point in the history
…community#652)"

This reverts commit ad3c442.
  • Loading branch information
jaimeyh committed Jun 14, 2024
1 parent 43c1967 commit 97fe97c
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions collector/nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,10 @@ import (
func getRoles(node NodeStatsNodeResponse) map[string]bool {
// default settings (2.x) and map, which roles to consider
roles := map[string]bool{
"master": false,
"data": false,
"data_hot": false,
"data_warm": false,
"data_cold": false,
"data_frozen": false,
"data_content": false,
"ml": false,
"remote_cluster_client": false,
"transform": false,
"ingest": false,
"client": true,
"master": false,
"data": false,
"ingest": false,
"client": true,
}
// assumption: a 5.x node has at least one role, otherwise it's a 1.7 or 2.x node
if len(node.Roles) > 0 {
Expand Down Expand Up @@ -1874,8 +1866,8 @@ func (c *Nodes) Collect(ch chan<- prometheus.Metric) {
// Handle the node labels metric
roles := getRoles(node)

for role, roleEnabled := range roles {
if roleEnabled {
for _, role := range []string{"master", "data", "client", "ingest"} {
if roles[role] {
metric := createRoleMetric(role)
ch <- prometheus.MustNewConstMetric(
metric.Desc,
Expand Down

0 comments on commit 97fe97c

Please sign in to comment.