Skip to content

Commit

Permalink
Fixing issue #4391 - Boost errors
Browse files Browse the repository at this point in the history
When system level polling is disabled Boost shows poller crashed errors and creates many arch tables
  • Loading branch information
TheWitness committed Sep 7, 2021
1 parent 34cb8db commit 7ea616b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Cacti CHANGELOG
-issue#4381: Fatal Errors can occur if you are not in a transaction and you attempt to commit one
-issue#4382: SNMP Agent may not find a cache item
-issue#4383: Fixes error callbacks for php 8.0+
-issue#4391: When system level polling is disabled Boost shows poller crashed errors and creates many arch tables
-feature: Add a normal/wrap class for general use
-feature#4344: Add a 15 minute poller interval to global_arrays.php
-feature#4385: Add additional admin email notifications
Expand Down
12 changes: 9 additions & 3 deletions poller.php
Original file line number Diff line number Diff line change
Expand Up @@ -890,18 +890,24 @@ function poller_replicate_check() {
function poller_enabled_check($poller_id) {
global $poller_db_cnn_id;

$disabled = db_fetch_cell_prepared('SELECT disabled
$poller_disabled = db_fetch_cell_prepared('SELECT disabled
FROM poller
WHERE id = ?',
array($poller_id), '', true, $poller_db_cnn_id);

if ($disabled == 'on') {
$system_enabled = read_config_option('poller_enabled');

if ($system_enabled == '') {
cacti_log('WARNING: System Polling is Disabled! Therefore, data collection from the poller will be suspended till re-enabled.', true, 'SYSTEM');

exit(1);
} elseif ($poller_disabled == 'on') {
db_execute_prepared('UPDATE poller
SET last_status=NOW()
WHERE id = ?',
array($poller_id), true, $poller_db_cnn_id);

cacti_log('WARNING: Poller ' . $poller_id . ' is Disabled, graphing or other activities are running', true, 'SYSTEM');
cacti_log('WARNING: Poller ' . $poller_id . ' is Disabled. Therefore, data collection for this Poller will be suspended till it\'s re-enabled.', true, 'SYSTEM');

exit(1);
}
Expand Down

0 comments on commit 7ea616b

Please sign in to comment.