Aiven-Open/prometheus-exporter-plugin-for-opensearch

Can I add custom labels to metrics collection?

Opened this issue · 1 comments

Depending on the user-defined Grafana dashboard, various filtering may be necessary.

It would be ideal to have a structure where custom labels can be appropriately registered as needed.

For example, it would be ideal if labels could be registered in a key-value format like the following

- job_name: opensearch
  scrape_interval: 10s
  metrics_path: "/_prometheus/metrics"
  static_configs:
  - labels:
    - env: prod
    - key2: value2
    - key3: value3
    - ...

catalog.registerNodeGauge("indices_doc_number", "Total number of documents");

@lukas-vlcek hi! Could you please consider this?