Clearing stale alerts the dirty way

I’d love a macro for checking if a device is covered by a scheduled maintenance. Or even better, checkboxes for ‘enable alert even if host is down’ and ‘enable alert even if host is under scheduled maintenance’. Implying that alerts should default to not be enabled if host is down or under scheduled maintenance. This is a matter of opinion of course.

In any case:
If a device goes down and an alert is triggered, and a scheduled maintenance is set for the device in question after the alert goes active, the alert will remain in the alert list.

Clearing all active alerts can be done via mysql like this:

MariaDB [librenms]> update alerts set state = 0 where state = 2;

Clearing individual alerts is left as an exercise for the reader.
describe devices;
describe alerts;
… may be of some guidance on your journey to thrash your first SQL database.

This topic was automatically closed 730 days after the last reply. New replies are no longer allowed.