alert.yaml.rules won't be passed and set up
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ceph Monitor Charm |
Fix Released
|
Undecided
|
Peter Sabaini | ||
Quincy.2 |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
ceph-mon quincy/stable 193
By reading the following patchset that landed to both the master branch and quincy.2 branch, there seems to be a function to send the definition of Ceph alert rules over the relation.
https:/
However, even after relating ceph-mon:
No "alert_rules" in the relation data either.
- relation-id: 35
endpoint: configurable-
cross-model: true
related-
application
scrape_jobs: '[{"metrics_path": "/metrics", "static_configs": [{"targets": ["*:9283"]}]}]'
scrape_
related-units:
remote-
Changed in charm-ceph-mon: | |
status: | New → Fix Committed |
assignee: | nobody → Peter Sabaini (peter-sabaini) |
Changed in charm-ceph-mon: | |
status: | Fix Committed → Fix Released |
By looking into the code, it looks like the charm is supposed to download the charm resource from the Juju controller into: juju/agents/ unit-ceph- mon-*/charm/ files/prometheu s_alert_ rules/alert. yaml.rules
/var/lib/
But there was no file there in any of the units.
However, explicitly running the upgrade-charm hook will call self.metrics_ endpoint. update_ alert_rules( ) and the file "alert.yaml.rules" will show up and the relation data is populated.
$ juju exec -u ceph-mon/leader "JUJU_DISPATCH_ PATH=hooks/ upgrade- charm ./dispatch"
I'm not sure why the initial update_ alert_rules( ) is not called or processed.