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 a3bab979..9b2e90e6 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 0a3a3fd9704e8667e76d3e19dbefe125f2bdee92 Mon Sep 17 00:00:00 2001 From: Sean Mancini Date: Sun, 16 Aug 2026 22:44:47 -0400 Subject: [PATCH 2/2] fix(#749): type 0 WARNING thold_log records warning emails not alert emails The type 0 warning notification log entry was incorrectly recording $alert_emails and $alert_bcc_emails instead of $warning_emails and $warning_bcc_emails. The mail was correctly sent to the warning list, but the threshold history UI showed the wrong recipients for all type-0 warning notifications. --- thold_functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/thold_functions.php b/thold_functions.php index 9b2e90e6..597da980 100644 --- a/thold_functions.php +++ b/thold_functions.php @@ -2579,8 +2579,8 @@ function thold_check_threshold(&$thold_data) { 'current' => $thold_data['lastread'], 'status' => ($ra ? ST_NOTIFYRAW : ST_NOTIFYWA), 'description' => ($maint_dev ? $subject . '. ' . __('Only logging, maint device', 'thold') : $subject), - 'emails' => $alert_emails, - 'bcc_emails' => $alert_bcc_emails] + 'emails' => $warning_emails, + 'bcc_emails' => $warning_bcc_emails] ); } 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);