From 43daa9b0c3e18042be76ac46ecd9e3e076dcb068 Mon Sep 17 00:00:00 2001 From: Sean Mancini Date: Sun, 16 Aug 2026 22:41:58 -0400 Subject: [PATCH 1/2] for for 750 --- thold_functions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/thold_functions.php b/thold_functions.php index a3bab97..9b2e90e 100644 --- a/thold_functions.php +++ b/thold_functions.php @@ -3390,7 +3390,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 +3406,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 +3420,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), From 9e96cbb67f7e75c1cbe81005cd3f1cbcf85b7fc9 Mon Sep 17 00:00:00 2001 From: Sean Mancini Date: Sun, 16 Aug 2026 23:02:26 -0400 Subject: [PATCH 2/2] Fix #752: Add independent evaluation for ALERT>WARNING path The Type 0 ALERT>WARNING elseif block (thold_functions.php) was only reached when was false from the prior warning block. Since is only set to true when && , the guard 'if (! && !)' was structurally dead code - was always false in this path. This adds an independent evaluation for the ALERT>WARNING path, matching the pattern used in all other notification blocks, so the suspend mechanism (reset_ack re-alert suppression) works correctly here. --- thold_functions.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/thold_functions.php b/thold_functions.php index 9b2e90e..d2cd9ef 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);