mirror of
https://github.com/librenms/librenms.git
synced 2024-09-21 10:28:13 +00:00
Fix alert -1 count (#16359)
This commit is contained in:
parent
8aab71a947
commit
40b629011f
@ -416,7 +416,8 @@ class RunAlerts
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($alert['state'] == AlertState::ACTIVE && ! empty($rextra['count']) && ($rextra['count'] == -1 || $alert['details']['count']++ < $rextra['count'])) {
|
if ($alert['state'] == AlertState::ACTIVE && ! empty($rextra['count']) && ($rextra['count'] == -1 || $alert['details']['count']++ < $rextra['count'])) {
|
||||||
if ($alert['details']['count'] < $rextra['count']) {
|
// We don't want -1 alert rule count alarms to get muted because of the current alert count
|
||||||
|
if ($alert['details']['count'] < $rextra['count'] || $rextra['count'] == -1) {
|
||||||
$noacc = true;
|
$noacc = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -439,7 +440,8 @@ class RunAlerts
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (in_array($alert['state'], [AlertState::ACTIVE, AlertState::WORSE, AlertState::BETTER]) && ! empty($rextra['count']) && ($rextra['count'] == -1 || $alert['details']['count']++ < $rextra['count'])) {
|
if (in_array($alert['state'], [AlertState::ACTIVE, AlertState::WORSE, AlertState::BETTER]) && ! empty($rextra['count']) && ($rextra['count'] == -1 || $alert['details']['count']++ < $rextra['count'])) {
|
||||||
if ($alert['details']['count'] < $rextra['count']) {
|
// We don't want -1 alert rule count alarms to get muted because of the current alert count
|
||||||
|
if ($alert['details']['count'] < $rextra['count'] || $rextra['count'] == -1) {
|
||||||
$noacc = true;
|
$noacc = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user