Closed lucabello closed 6 months ago
Closes #133.
Observe the upgrade_charm event to regenerate nrpe alert rules and scrape jobs.
upgrade_charm
This PR also gets rid of relation_id in the NrpeTargetsChanged event, as it's not used at all.
relation_id
NrpeTargetsChanged
On a machine model:
juju deploy ubuntu juju deploy nrpe --channel=latest/edge juju relate ubuntu nrpe juju deploy cos-proxy --channel=latest/stable --revision=59 # before `absent_over_time` juju relate cos-proxy nrpe juju ... # set up a prometheus offer from a k8s model juju relate cos-proxy prometheus
Check the NRPE alert rules to make sure they are there (and notice how absent_over_time) isn't there; then:
absent_over_time
charmcraft pack # pack the charm from this PR juju refresh --path=./path-to-the.charm
Check the alert rules again, they should have been updated (and should contain absent_over_time now)
Issue
Closes #133.
Solution
Observe the
upgrade_charm
event to regenerate nrpe alert rules and scrape jobs.This PR also gets rid of
relation_id
in theNrpeTargetsChanged
event, as it's not used at all.Testing Instructions
On a machine model:
Check the NRPE alert rules to make sure they are there (and notice how
absent_over_time
) isn't there; then:Check the alert rules again, they should have been updated (and should contain
absent_over_time
now)