-
-
Notifications
You must be signed in to change notification settings - Fork 412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide additional admin email notifications #4385
Changes from 5 commits
208e371
71dc992
a73dc21
039d276
c6365c3
44ca34d
e053f3f
335dbcd
e9369da
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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')); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You have used spaces instead of tabs. |
||
exit(1); | ||
break; | ||
default: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You have used spaces instead of tabs. |
||
} | ||
|
||
if (!$logged) { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,9 +50,12 @@ | |
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')); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You have used spaces instead of tabs. |
||
} | ||
|
||
exit(1); | ||
} | ||
} | ||
#} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a reason for this comment character ? |
||
|
||
/** sig_handler - provides a generic means to catch exceptions to the Cacti log. | ||
* @arg $signo - (int) the signal that was thrown by the interface. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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' )); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You have used spaces instead of tabs. |
||
|
||
} | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing colon :)