openebs / monitoring

OpenEBS Monitoring add-on. A set of Grafana, Prometheus, and alert manager plugins.
Apache License 2.0
28 stars 20 forks source link

Relabel configs added for cstor pools and volumes #16

Closed Ab-hishek closed 3 years ago

Ab-hishek commented 3 years ago

What this PR does?

This PR adds supports for adding relabel Prometheus configs to apply to cStor pools and volumes & jiva volumes.

What were the requirements for this PR?

To re-label Prometheus configuration. When using probe configs, the metrics collected can set additional labels(subsequent relabeling involved) that can be used in queries and dashboards.

How does this work?

By passing re-label configurations to the service monitors and pod monitors responsible for scraping cStor pools and volumes metrics. In service monitors relabelings belong to pod -> then how does it work? [Answer] -> Since the service monitors apply configuration of endpoints role therefore for endpoints role, we have two points to note:

And in the pod monitors since that applies to pod directly therefore the relabelings works fine there.

After relabeling, the metrics looks like this:

Also changes in service monitors and pod monitors template is involved in this PR.

Signed-off-by: Abhishek Agarwal abhishek.agarwal@mayadata.io