mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix alert -1 count (#16359)
This commit is contained in:
@@ -416,7 +416,8 @@ class RunAlerts
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -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 ($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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user