hello. I’m posting this using a translator first, so I apologize for any sloppiness.
Recently I’ve noticed that my syslog alerts are not working properly.
alert rule:
syslog.timestamp >= “macros.past_2m” AND syslog.msg REGEXP “changed.*(down|up)”
SELECT * FROM devices,syslog WHERE (devices.device_id = ? AND devices.device_id = syslog.device_id) AND syslog.timestamp >= “macros.past_2m” AND syslog.msg REGEXP “changed.*(down|up)”
With the rule set up like this, up until last week it would only react if the time in the device’s syslog message was correct, but now every time it polls, the rule matches regardless of the syslog time and the alarm continues to go off.
However, when you go into the alarm device, all you see is syslogs that are actually way out of date.
I see something like this in the alert history, can you help me troubleshoot this?
Added #1: last_polled => ‘2025-01-31 11:15:34’
last_polled_timetaken => ‘2.973335981369’
last_discovered_timetaken => ‘4.141’
last_discovered => ‘2025-01-31 06:47:38’
msg => ‘Interface GigabitEthernet1/0/1, changed state to down’
Added #2: last_polled => ‘2025-01-31 11:15:34’
last_polled_timetaken => ‘2.973335981369’
last_discovered_timetaken => ‘4.141’
last_discovered => ‘2025-01-31 06:47:38’
msg => ‘Interface GigabitEthernet1/0/2, changed state to administratively down’
Added #3: last_polled => ‘2025-01-31 11:15:34’
last_polled_timetaken => ‘2.973335981369’
last_discovered_timetaken => ‘4.141’
last_discovered => ‘2025-01-31 06:47:38’
msg => ‘Interface GigabitEthernet1/0/2, changed state to down’
Added #4: last_polled => ‘2025-01-31 11:15:34’
last_polled_timetaken => ‘2.973335981369’
last_discovered_timetaken => ‘4.141’
last_discovered => ‘2025-01-31 06:47:38’
msg => ‘Interface GigabitEthernet1/0/1, changed state to administratively down’
Added #5: last_polled => ‘2025-01-31 11:15:34’
last_polled_timetaken => ‘2.973335981369’
last_discovered_timetaken => ‘4.141’
last_discovered => ‘2025-01-31 06:47:38’
msg => ‘Interface GigabitEthernet1/0/1, changed state to down’
Added #6: last_polled => ‘2025-01-31 11:15:34’
last_polled_timetaken => ‘2.973335981369’
last_discovered_timetaken => ‘4.141’
last_discovered => ‘2025-01-31 06:47:38’
msg => ‘Interface GigabitEthernet1/0/1, changed state to administratively down’
Currently, this rule is matched to all the devices and keeps going off, so I’ve disabled it for now.
How can I fix this?
If an alert rule for syslog is not a good idea, is there any way to accomplish this besides syslog notifications?
What I want to do is get notified of events where a port on a registered switch is temporarily up or down.