diff --git a/CHANGELOG b/CHANGELOG index b21671d7b5..8eba74fe87 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -9,6 +9,7 @@ Cacti CHANGELOG -issue#4382: SNMP Agent may not find a cache item -issue#4383: Fixes error callbacks for php 8.0+ -feature#4344: Add a 15 minute poller interval to global_arrays.php +-feature#4385: Add additional admin email notifications 1.2.18 -security#4261: Lack of escaping on template import can lead to XSS exposure under 'midwinter' theme (CVE-2020-14424) by ddb4github diff --git a/cactid.php b/cactid.php index cb84b54c65..4f0793017a 100755 --- a/cactid.php +++ b/cactid.php @@ -41,6 +41,7 @@ function sig_handler($signo) { case SIGTERM: case SIGINT: cacti_log('WARNING: Cacti Daemon PID[' . getmypid() . '] Terminated on Device[' . gethostname() . ']', true, 'CACTID'); + admin_email(__('Cacti System Warning'), __('WARNING: Cacti Daemon PID[' . getmypid() . '] Terminated on Device[' . gethostname() . ']', true, 'CACTID')); exit(1); break; default: @@ -127,6 +128,7 @@ function sig_handler($signo) { // We are the child } else { cacti_log('NOTE: Cacti Daemon PID[' . getmypid() . '] Started on Device[' . gethostname() . ']'); + admin_email(__('Cacti System Notice'), __('Notice: Cacti Daemon PID[' . getmypid() . '] Started on Device[' . gethostname() . ']', true, 'CACTID')); print '[OK]' . PHP_EOL; diff --git a/poller.php b/poller.php index 029b746429..502118e01f 100755 --- a/poller.php +++ b/poller.php @@ -797,6 +797,7 @@ function sig_handler($signo) { } } else { cacti_log('WARNING: Cacti Polling Cycle Exceeded Poller Interval by ' . ($loop_end-$loop_start-$poller_interval) . ' seconds', true, 'POLLER', $level); + admin_email(__('Cacti System Warning'), __('WARNING: Cacti Polling Cycle Exceeded Poller Interval by ' . ($loop_end-$loop_start-$poller_interval) . ' seconds', true, 'POLLER', $level)); } if (!$logged) { diff --git a/poller_automation.php b/poller_automation.php index 935f9152e3..fcc959faa6 100755 --- a/poller_automation.php +++ b/poller_automation.php @@ -50,6 +50,9 @@ db_force_remote_cnn(); } else { cacti_log('WARNING: Main Cacti database offline or in recovery. Can not run automation', false, 'AUTOM8'); + admin_email(__('Cacti System Warning'), __('WARNING: Main Cacti database offline or in recovery')); + } + exit(1); } } diff --git a/poller_boost.php b/poller_boost.php index 5bf95872ea..a2d2ef0429 100755 --- a/poller_boost.php +++ b/poller_boost.php @@ -307,6 +307,8 @@ function boost_prepare_process_table() { /* if the runtime was exceeded, allow the next process to run */ if ($previous_start_time + $max_run_duration < $start_time) { cacti_log('WARNING: Detected Poller Boost Overrun, Possible Boost Poller Crash', false, 'BOOST SVR'); + admin_email(__('Cacti System Warning'), __('WARNING: Detected Poller Boost Overrun, Possible Boost Poller Crash', 'BOOST SVR' )); + } } }