diff --git a/include/global_settings.php b/include/global_settings.php index 4cb8236bd8..bf2aa70fea 100644 --- a/include/global_settings.php +++ b/include/global_settings.php @@ -1747,33 +1747,45 @@ 'method' => 'spacer', ), 'poller_warning_1h_count' => array( - 'friendly_name' => __('1h count warning threshold'), - 'description' => __('When this count of guarded ratio (below) is reached in one hour, warning will be written to log and email will be send. 0 = disable.'), - 'method' => 'textbox', + 'friendly_name' => __('One Hour Count Warning Threshold'), + 'description' => __('When the count of the Poller Guarded Ratio (below) is reached in one hour, a warning will be written to log and email will be sent to the Primary Cact Administraror.'), + 'method' => 'drop_array', 'default' => '3', - 'max_length' => 1, - 'size' => 4, - ), + 'array' => array( + '0' => __('Disabled'), + '1' => __('%d Poller Intervals', 1), + '2' => __('%d Poller Intervals', 2), + '3' => __('%d Poller Intervals', 3), + '4' => __('%d Poller Intervals', 4), + '5' => __('%d Poller Intervals', 5), + '6' => __('%d Poller Intervals', 6), + '7' => __('%d Poller Intervals', 7), + '8' => __('%d Poller Intervals', 8), + '9' => __('%d Poller Intervals', 9), + '10' => __('%d Poller Intervals', 10), + ) + ), 'poller_warning_1h_ratio' => array( - 'friendly_name' => __('1 hour guarded poller ratio run/max'), - 'description' => __('Define guarded ratio poller run/max time (in percent).'), + 'friendly_name' => __('One Hour Guarded Poller Ratio run/max'), + 'description' => __('Define a Guarded Poller Ratio run/max time (in percent).'), 'method' => 'drop_array', 'default' => '70', 'array' => array( - '0' => '0', + '0' => __('Disabled'), '50' => '50', '60' => '60', '70' => '70', '80' => '80', - '90' => '90',) - ), + '90' => '90' + ) + ), 'poller_warning_24h_ratio' => array( - 'friendly_name' => __('24 hours guarded poller ratio run/max'), - 'description' => __('Define guarded average ratio poller run/max time (in percent). When it is reached, warning will be written to log and email will be send. 0 = disable'), + 'friendly_name' => __('24 Hour Guarded Poller Ratio run/max'), + 'description' => __('Define a Guarded average Ratio Poller run/max time (in percent). When it is reached, warning will be written to log and email will be sent to the Primary Cacti administrator.'), 'method' => 'drop_array', 'default' => '60', 'array' => array( - '0' => '0', + '0' => __('Disabled'), '50' => '50', '60' => '60', '70' => '70', diff --git a/poller.php b/poller.php index 9f9ba51b7e..8d70fbc6b6 100755 --- a/poller.php +++ b/poller.php @@ -1325,14 +1325,14 @@ function poller_run_stats($loop_start) { $count = db_fetch_cell('SELECT COUNT(total_time) FROM poller_time_stats'); if ($count > 0) { - $ratio = round($sum / $count,2); + $ratio = round($sum / $count, 2); - cacti_log(__("24 hours avg. poller run time is $ratio seconds, min: $min, max: $max") , true, 'POLLER'); + cacti_log(sprintf("24 Hour Average Poller run time is %0.2f seconds, min: %s , max: %s", $ratio, $min, $max), true, 'POLLER'); if ($ratio / $poller_interval > $threshold_24h / 100 && $threshold_24h > 0) { - cacti_log(__("WARNING: 24 hours poller avg. run time reached more than $threshold_24h% of time limit") , true, 'POLLER'); + cacti_log(sprintf("WARNING: 24 Hour Poller Average run time reached more than %s percent of time limit.", $threshold_24h), true, 'POLLER'); - admin_email(__('Cacti System Warning'), __('WARNING: 24 hours Poller[%d] avg. run time is %f seconds (more than %d % of time limit)', $poller_id, $ratio,$threshold_24h)); + admin_email(__('Cacti System Warning'), __('WARNING: 24 Hour Poller[%d] Average run time threshold breached. It is %f seconds (more than %d % of threshold.)', $poller_id, $ratio, $threshold_24h)); } } } @@ -1346,9 +1346,9 @@ function poller_run_stats($loop_start) { array($poller_interval, $threshold_1h)); if ($count > $threshold_1h_count && $threshold_1h_count > 0) { - cacti_log(__("WARNING: In last hour poller run time $count times (limit $threshold_1h_count) reached more than $threshold_1h% of time limit") , true, 'POLLER'); + cacti_log(sprintf("WARNING: In the last hour, the Poller run time exceeded the threshold %d times (limit %d) by %d percent of time limit.", $count, $threshold_1h_count, $threshold_1h) , true, 'POLLER'); - admin_email(__('Cacti System Warning'), __('WARNING: In last hour Poller[%d] run time %d times reached more than %d % of time limit', $poller_id, $threshold_1h_count, $threshold_1h)); + admin_email(__('Cacti System Warning'), __('WARNING: In last hour Poller[%d] run time exceeded the threshold %d times (limit %d) by %d percent of the time limit.', $poller_id, $count, $threshold_1h_count, $threshold_1h)); } }