Skip to content

Commit

Permalink
add addiitonal admin email notifications (#4385)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmfmancini authored Sep 1, 2021
1 parent b314a6f commit d422969
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions cactid.php
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions poller.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 3 additions & 0 deletions poller_automation.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
2 changes: 2 additions & 0 deletions poller_boost.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' ));

}
}
}
Expand Down

0 comments on commit d422969

Please sign in to comment.