Skip to content

Conversation

@pincher95
Copy link
Contributor

This pull request updates the elasticsearch_nodes_roles metric to include the node ID as a new label, improving the uniqueness and traceability of reported node roles. The change modifies both the metric collection logic and the related tests to ensure the new label is present and validated.

Enhancements to Node Role Metrics:

  • Added the node (node ID) label to the elasticsearch_nodes_roles metric definition, making each metric instance uniquely identifiable by node ID in addition to cluster, host, and name.
  • Updated the metric collection loop in collector/nodes.go to iterate over node IDs and include the node ID as a label value when emitting node role metrics. [1] [2]

Test Updates:

  • Modified test expectations in collector/nodes_test.go to require the new node label in all elasticsearch_nodes_roles metric assertions, ensuring tests validate the updated metric format. [1] [2] [3]

feat(collector): using nodeID in metric labels for better uniqueness

Signed-off-by: pincher95 <yuri.tsuprun@gmail.com>
Signed-off-by: pincher95 <yuri.tsuprun@logz.io>
@pincher95 pincher95 force-pushed the feature/add-node-label-to-nodes-roles branch from 147729c to 37975e3 Compare December 4, 2025 18:50
@pincher95
Copy link
Contributor Author

resolve #1105

@pincher95
Copy link
Contributor Author

@sysadmind pushed a new PR with a clean history

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.

1 participant