set job_name through scrape relation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Prometheus2 charm |
New
|
Undecided
|
Unassigned |
Bug Description
I know that it is possible to pass hostname, port and metrics_path through the relation. Is it possible to pass job_name as well? Because if I create multiple objects of the relation they will all be under the same scrape job, overwriting the previous metrics_path. I need it to create multiple scrape jobs with different metrics paths.
Example:
1st object:
event.relation.
event.relation.
event.relation.
event.relation.
2nd object:
event.relation.
event.relation.
event.relation.
event.relation.
```
prometheus.yaml
- job_name: 'MyMetrics'
metrics_path: '/metrics'
static_configs:
- targets:
- 192.168.1.5:5555
- job_name: 'MyDebugMetrics'
metrics_path: '/debug/metrics'
static_configs:
- targets:
- 192.168.1.5:6666
description: | updated |
Anyone help on this?