Closed aleksashka closed 4 years ago
The repeat_alert is independent of any polling time from what I can see so should be 60 seconds, not 300 (5 minutes). The reason being that 1 minute is 60 seconds and the array clear states minutes, not polling intervals. If you multiply it by 300, you'll effectively get 1 minute = 5 minutes.
We can fix that our end, later of if you like, you can submit a pull request with the change?
Take a look at lines 394 and 395 of syslog_alerts.php
:
1 => __('%d Minutes', 5, 'syslog'),
2 => __('%d Minutes', 10, 'syslog'),
Choosing 10 Minutes Re-Alert Cycle stores value 2
in database, which later gets multiplied by poller_interval
. If poller_interval
is set to 5 minutes, then everything is fine. Otherwise, Re-Alert is not working as expected.
Yes, sorry, didn't look too closely, my bad. So, your original 300 would be right as long as everything was in 5 minute intervals. However, I think some realignment is needed, wouldn't you agree if you look at https://github.com/Cacti/plugin_syslog/blob/develop/syslog_alerts.php#L399 ?
This should be resolved now.
I managed to find out that line 392 of
syslog_alerts.php
definesrepeatarray
using 5-minute intervals (1, 2, 3 for 5, 10, and 15 minutes respectively), which is totally fine with 5-minutepoller_interval
, since repeat value later gets multiplicated bypoller_interval
in line 346 ofsyslog_process.php
for calculating silence time.Unfortunately, selecting 30-minutes Re-Alert Cycle with 1-minute
poller_interval
effectively uses 6-minute cycle.From newbie's point of view it seems that it should be OK to multiply repeat values by 300 seconds no matter what
poller_interval
is (works fine in my case, not sure whypoller_inteval
was used in first place). Unfortunately, I am not totally sure this will not break something else :).