Skip to content
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

Merged
merged 9 commits into from
Sep 1, 2021
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Cacti CHANGELOG
-issue#4381: Fatal Errors can occur if you are not in a transaction and you attempt to commit one
-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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing colon :)


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
1 change: 1 addition & 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'));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have used spaces instead of tabs.

exit(1);
break;
default:
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));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have used spaces instead of tabs.

}

if (!$logged) {
Expand Down
5 changes: 4 additions & 1 deletion poller_automation.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have used spaces instead of tabs.

}

exit(1);
}
}
#}
Copy link
Member

Choose a reason for hiding this comment

The 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.
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' ));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have used spaces instead of tabs.


}
}
}
Expand Down