Skip to content

Commit

Permalink
Fixing #5224 - Rounding error
Browse files Browse the repository at this point in the history
When poller run is exceeded by only a short period of time, Cacti does not round the number in the error
  • Loading branch information
TheWitness committed Feb 3, 2023
1 parent e17c925 commit b4e022b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Expand Up @@ -46,6 +46,7 @@ Cacti CHANGELOG
-issue#5208: Package form objects use the wrong text domain in their i18n strings
-issue#5211: Undefined variable $user_id when creating new graph
-issue#5223: Drop callback function sometimes puts name in the form input instead of the id
-issue#5224: When poller run is exceeded by only a short period of time, Cacti does not round the number in the error

1.2.23
-security#4920: Add .htaccess file to scripts folder
Expand Down
4 changes: 2 additions & 2 deletions poller.php
Expand Up @@ -799,8 +799,8 @@ function sig_handler($signo) {
api_plugin_hook('poller_top');
}
} 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));
cacti_log('WARNING: Cacti Polling Cycle Exceeded Poller Interval by ' . round($loop_end-$loop_start-$poller_interval, 2) . ' seconds', true, 'POLLER', $level);
admin_email(__('Cacti System Warning'), __('WARNING: Cacti Polling Cycle Exceeded Poller Interval by ' . round($loop_end-$loop_start-$poller_interval, 2) . ' seconds', true, 'POLLER', $level));
}

if (!$logged) {
Expand Down

0 comments on commit b4e022b

Please sign in to comment.