Alerts inside recurring scheduled maintenance for device group

Recurring maintenance mapped to device group, seems to be ignored and alerts are sent inside the maintenance interval.

image

Example alert:

Rule:

The device is mapped to multiple groups … does it matter ?
Is there a way to check in the rule and exempt alerts for devices that are in maintenance?

====================================

Component Version
LibreNMS 1.32-26-g3381b40
DB Schema 210
PHP 5.4.16
MySQL 5.5.50-MariaDB
RRDTool 1.4.8
SNMP NET-SNMP 5.7.2
====================================

[OK] Database connection successful
[OK] Database schema correct

check your group makes sure the device is actually in that group.

Also to debug alert goto the device and click on the gear icon → capture → Alerts debug.

this will show whats going on with the alert.

Thanks Kevin, device is part of the group mapped to maintenance.
Debug information doesn’t say anything about checking if device is in maintenance.
Scheduled maintenance it has always the status “Current” ?

says that cause the maintenance is active. since you set to recurring scheduled.

try running debug from cli ./poller.php -h HOSTNAME -d

near the bottom, you should see this if the scheduled maintenance is working.

Under Maintenance, Skipping alerts.

Yes it does say
Under Maintenance, Skipping alerts.
It doesn’t make sense … I have triggered other alert ‘Authentication failure’ and it doesn’t alert about that … when in maintenance.
What can it be ?

Right its doing what is supposed to do not alert on any rule. Unless im not understanding your statement here?

yes … on this ‘Authentication failure’ it doesn’t alert … so it’s working ok … but on ‘Device rebooted’ it ignoring the maintenance and sends alerts
Authentication failure rule

Device rebooted rule

Maintenance ends … long after devices.uptime < “300”

do you have any errors or fails on validate.php ?

No … I’ve posted the output up … I do have some errors in librenms.log about MySQL Error: Unknown column ‘mempools.mempool_desc’ … unlikely to be related.

Well if the maintenance time ends then, of course, you going to receive an alert for the restart. At this point im not sure… maybe time issue? Does your LibreNMS server have the correct time and date set? :smile:

The way I read this … is "alert if device uptime is less than 5 minutes and if device its running"
So if maintenance ends one hour after the device was restarted … does it make sense to send alerts ?

depends on what the device is reporting back on SNMP uptime.
So possible the device is reporting back with bad data on SNMP uptime…
Does the device have the correct time set?

Yes … and it has the correct uptime now.

Rule name: Device rebooted
Alert rule: %devices.uptime < “300” && %macros.device = “1”
Alert query: SELECT * FROM devices WHERE (devices.device_id = ?) && (devices.uptime < “300” && ((devices.disabled = 0 && devices.ignore = 0)) = “1” )
Rule match: no match

I guess I should change the rule or delay it maybe delay it more.

1 Like

Is there a way to check when was the device last polled ? in alerts

you can check in the web ui /poll-log/

It doesn’t make sense …
In the example the alert is sent 04 :clock10: and the maintenance ends at 06 ?

is the PHP timezone setup correctly for your region?

Yes … I normally use UTC all over.