Skip to content

Commit

Permalink
Update 'status changed' alert example
Browse files Browse the repository at this point in the history
If you use the expression as written you receive an alert for each status reported because the status exists and is equal to 0.
  • Loading branch information
jhh authored Jul 14, 2024
1 parent fad1356 commit 8ce8d36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ It is strongly suggested to observe your UPS under both "normal" and "abnormal"
As noted above, the UPS status is a special case and is handled with flags set as labels on the `network_ups_tools_ups_status` metric. Therefore, alerting can be configured for specific statuses. Examples:
* **Alert if the UPS has exited 'online' mode**: `network_ups_tools_ups_status{flag="OL"} == 0`
* **Alert if the UPS has gone on battery**: `network_ups_tools_ups_status{flag="OB"} == 1`
* **Alert if any status changed in the past 5 minutes** changes(network_ups_tools_ups_status[5m])
* **Alert if any status changed in the past 5 minutes** `changes(network_ups_tools_ups_status[5m]) > 0`

Unfortunately, the NUT documentation does not call out the full list of statuses each driver implements nor what a user can expect for a status.
The following values were detected in the [NUT driver documentation](https://github.com/networkupstools/nut/blob/master/docs/new-drivers.txt):
Expand Down

0 comments on commit 8ce8d36

Please sign in to comment.