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:
If the endpoints belong to a service, all labels of the role: service discovery are attached.
For all targets backed by a pod, all labels of the role: pod discovery are attached.
And in the pod monitors since that applies to pod directly therefore the relabelings works fine there.
After relabeling, the metrics looks like this:
Sample cStor Pool metric:
Sample cStor Volume metric:
Also changes in service monitors and pod monitors template is involved in this PR.
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:
Sample cStor Pool metric:![Screenshot from 2021-05-18 14-25-39](https://user-images.githubusercontent.com/44068648/118671743-5a13c080-b815-11eb-973e-9daeecaa27ae.png)
Sample cStor Volume metric:![Screenshot from 2021-05-18 14-26-05](https://user-images.githubusercontent.com/44068648/118671908-7b74ac80-b815-11eb-8800-11b0bc3833b8.png)
Also changes in service monitors and pod monitors template is involved in this PR.
Signed-off-by: Abhishek Agarwal abhishek.agarwal@mayadata.io