Relation with multiple units creates only 1 datasource
Bug #1784356 reported by
Mario Bris
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grafana-source Interface |
New
|
Undecided
|
Unassigned |
Bug Description
Datasource name comes from service_name + juju generated source. This is problem if relation between grafana and prometheus with multiple units (prometheus/0 and prometheus/1) because datasource name has to be uniq and only 1 is added.
Adding suffix 0 and up to to each unit (service_name) during communication will ensure there will be datasource for each unit.
As example is ~brism branch with the code.
Other option would be add "unit_name" or "num" variable and work with them inside grafana charm