Skip to content

Commit

Permalink
Update nrpe_exporter.py (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
simskij authored Mar 29, 2023
1 parent 45dd5c2 commit efa0891
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/charms/nrpe_exporter/v0/nrpe_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ def _generate_alert(self, relation, cmd, id, unit) -> dict:
return {
"alert": "{}NrpeAlert".format("".join([x.title() for x in cmd.split("_")])),
# Average over 5 minutes considering a 60 second scrape interval
"expr": "avg_over_time(command_status{{juju_unit='{}',command='{}'}}[5m]) > 1".format(
"expr": "avg_over_time(command_status{{juju_unit='{}',command='{}'}}[15m]) > 1".format(
re.sub(r"^(.*?)[-_](\d+)$", r"\1/\2", id.replace("_", "-")), cmd
)
+ " or (absent_over_time(up{{juju_unit='{}'}}[10m]) == 1)".format(
Expand Down

0 comments on commit efa0891

Please sign in to comment.