diff --git a/thold_functions.php b/thold_functions.php index a3bab979..d2cd9ef5 100644 --- a/thold_functions.php +++ b/thold_functions.php @@ -2585,6 +2585,13 @@ function thold_check_threshold(&$thold_data) { } elseif (($thold_data['thold_warning_fail_count'] >= $warning_trigger) && ($thold_data['thold_fail_count'] >= $trigger)) { $subject = get_email_subject('ALERT > WARNING', false, $lastread, $ra, $warning_breach_up, $thold_data); + // If this is a realert and the operator has reset the ack, don't notify + if ($ra && $thold_data['reset_ack'] == 'on' && $thold_data['acknowledgment'] == '') { + $suspend_notify = true; + } else { + $suspend_notify = false; + } + if (!$suspend_notify && !$maint_dev) { $notify_list_id = $thold_data['notify_alert']; $format_file = thold_get_thold_notification_format_file($thold_data['id'], $notify_list_id); @@ -3390,7 +3397,7 @@ function thold_check_threshold(&$thold_data) { 'host_id' => $thold_data['host_id'], 'local_graph_id' => $thold_data['local_graph_id'], 'threshold_id' => $thold_data['id'], - 'threshold_value' => ($breach_up ? $thold_data['time_hi'] : $thold_data['time_low']), + 'threshold_value' => ($warning_breach_up ? $thold_data['time_warning_hi'] : $thold_data['time_warning_low']), 'current' => $thold_data['lastread'], 'status' => ($ra ? ST_NOTIFYRAW : ST_NOTIFYWA), 'description' => ($maint_dev ? $subject . '. ' . __('Only logging, maint device', 'thold') : $subject), @@ -3406,7 +3413,7 @@ function thold_check_threshold(&$thold_data) { 'host_id' => $thold_data['host_id'], 'local_graph_id' => $thold_data['local_graph_id'], 'threshold_id' => $thold_data['id'], - 'threshold_value' => ($warning_breach_up ? $thold_data['time_hi'] : $thold_data['time_low']), + 'threshold_value' => ($warning_breach_up ? $thold_data['time_warning_hi'] : $thold_data['time_warning_low']), 'current' => $thold_data['lastread'], 'status' => ST_NOTIFYRAW, 'description' => ($maint_dev ? $subject . '. ' . __('Only logging, maint device', 'thold') : $subject), @@ -3420,7 +3427,7 @@ function thold_check_threshold(&$thold_data) { 'host_id' => $thold_data['host_id'], 'local_graph_id' => $thold_data['local_graph_id'], 'threshold_id' => $thold_data['id'], - 'threshold_value' => ($warning_breach_up ? $thold_data['time_hi'] : $thold_data['time_low']), + 'threshold_value' => ($warning_breach_up ? $thold_data['time_warning_hi'] : $thold_data['time_warning_low']), 'current' => $thold_data['lastread'], 'status' => ST_TRIGGERW, 'description' => ($maint_dev ? $subject . '. ' . __('Only logging, maint device', 'thold') : $subject),