Skip to content

[FEATURE] Add node_name label to elasticsearch_indices_shards_docs metric #1080

@andyba2016

Description

@andyba2016

Hi Team:

Feature Request

Currently, the elasticsearch_indices_shards_docs metric only exposes labels for index, shard, and state.
It would be very useful to also include the node_name (or node_id) as a label, so that we can directly
correlate shard-level metrics with the node where the shard is located.

Why?

  • Allows PromQL queries joining shard-level metrics with node metrics.
  • Makes it easier to detect imbalances or issues on specific nodes without additional exporters.

Possible implementation

  • Extend the metric descriptor in collector/indices.go to include node_name.
  • Use _nodes API to map node_idnode_name.
  • Alternatively, expose a new metric (elasticsearch_indices_shards_docs_by_node) to avoid breaking existing queries.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions