Skip to content

Conversation

@pincher95
Copy link
Contributor

@pincher95 pincher95 commented Nov 26, 2025

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]

@pincher95 pincher95 changed the title Feature/add node label to nodes roles feat: add node label on elasticsearch_nodes_roles metric Nov 26, 2025
@pincher95
Copy link
Contributor Author

resolve #1105

@sysadmind
Copy link
Contributor

This PR description seems to be inaccurate. Please update the description with the accurate description of the intent of this PR.

@pincher95
Copy link
Contributor Author

@sysadmind updated

@sysadmind
Copy link
Contributor

I think this content is okay, but the commit history is a mess. I think this needs to be rebased onto the latest master branch.

@pincher95 pincher95 force-pushed the feature/add-node-label-to-nodes-roles branch 2 times, most recently from 8a1f65d to 625f38e Compare December 4, 2025 16:25
@pincher95 pincher95 closed this Dec 4, 2025
@pincher95 pincher95 force-pushed the feature/add-node-label-to-nodes-roles branch from 625f38e to 279ba21 Compare December 4, 2025 16:28
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.

2 participants