I have a few UPS backup units being monitored by SNMP. LibreNMS emails when battery percent drops below 60 percent. But when the battery completely drains and devices goes offline, It still continues to email out the last know values of the UPS. Anyway to get it to stop emailing when devices go offline?
Device>Device Settings>Ignore check the box to Ignore Alerts.
Click on Save
You should show the rule you are using so we can recommend changes.
Hi, I created one like this.
UPS Battery Below 60 Percent
%devices.os = “poweralert” && %sensors.sensor_class = “charge” && %sensors.sensor_current <= “60” && %sensors.sensor_current != "0"
I was getting alerts even after devices went offline, so I added this.
&& %devices.status = "1"
Seems to work fine now after adding. But will I have to do %devices.status = “1” for all alerts. Seems like without this when the device goes offline it continues to email since the database still shows under 60. This happens for any alert check like temp over 60c, even if device is down it still reports.
Also I saw there was precreated rules. Any site or place I can find additional ones other people have already created for more ideas?
Thank You
You can use %macros.device_up = “1” but yes, we probably should add this to most rules by default.
You can submit extra rules by editing this file and going through a pull request: https://github.com/librenms/librenms/blob/master/misc/alert_rules.json
Not to get off topic is using %macros.device_down = “1” better than %devices.status = “1”?
Because I enabled the Devices up/down rule which is pretty much just %devices.status = “1” and I get a notification from all the devices with that rule listed. All the devices are up and haven’t gone down for a while. Any Ideas?
Thank You