mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-01 08:03:30 +02:00
Only process followups if there are any results
This commit is contained in:
+1
-1
@@ -193,7 +193,7 @@ function RunFollowUp() {
|
|||||||
$state = 4;
|
$state = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($state > 0) {
|
if ($state > 0 && $n > 0) {
|
||||||
$alert['details']['rule'] = $chk;
|
$alert['details']['rule'] = $chk;
|
||||||
if (dbInsert(array('state' => $state, 'device_id' => $alert['device_id'], 'rule_id' => $alert['rule_id'], 'details' => gzcompress(json_encode($alert['details']), 9)), 'alert_log')) {
|
if (dbInsert(array('state' => $state, 'device_id' => $alert['device_id'], 'rule_id' => $alert['rule_id'], 'details' => gzcompress(json_encode($alert['details']), 9)), 'alert_log')) {
|
||||||
dbUpdate(array('state' => $state, 'open' => 1, 'alerted' => 1), 'alerts', 'rule_id = ? && device_id = ?', array($alert['rule_id'], $alert['device_id']));
|
dbUpdate(array('state' => $state, 'open' => 1, 'alerted' => 1), 'alerts', 'rule_id = ? && device_id = ?', array($alert['rule_id'], $alert['device_id']));
|
||||||
|
|||||||
Reference in New Issue
Block a user