OP#436 more controls
This commit is contained in:
@@ -117,6 +117,40 @@
|
|||||||
# Default is '1'.
|
# Default is '1'.
|
||||||
# @param [String] ng_log_notifications Whether to log notifications in Nagios.
|
# @param [String] ng_log_notifications Whether to log notifications in Nagios.
|
||||||
# Default is '1'.
|
# Default is '1'.
|
||||||
|
# @param [String] ng_log_service_retries Whether to log service check retries
|
||||||
|
# in Nagios. Default is '1'.
|
||||||
|
# @param [String] ng_log_host_retries Whether to log host check retries
|
||||||
|
# in Nagios. Default is '1'.
|
||||||
|
# @param [String] ng_log_event_handlers Whether to log event handlers in Nagios.
|
||||||
|
# Default is '1'.
|
||||||
|
# @param [String] ng_log_initial_states Whether to log initial states in Nagios.
|
||||||
|
# Default is '0'.
|
||||||
|
# @param [String] ng_log_current_states Whether to log current states in Nagios.
|
||||||
|
# Default is '1'.
|
||||||
|
# @param [String] ng_log_external_commands Whether to log external commands in
|
||||||
|
# Nagios. Default is '1'.
|
||||||
|
# @param [String] ng_log_passive_checks Whether to log passive checks in Nagios.
|
||||||
|
# Default is '1'.
|
||||||
|
# @param [Array] ng_glob_host_evt_handler An array of global host event handlers
|
||||||
|
# for Nagios. Default is [].
|
||||||
|
# @param [Array] ng_glob_svc_evt_handler An array of global service event handlers
|
||||||
|
# for Nagios. Default is [].
|
||||||
|
# @param [String] ng_svc_int_check_delay The service inter-check delay method
|
||||||
|
# for Nagios. Default is 's'.
|
||||||
|
# @param [String] ng_max_svc_check_spread The maximum service check spread for
|
||||||
|
# Nagios. Default is '30'.
|
||||||
|
# @param [String] ng_svc_interleave_factor The service interleave factor for
|
||||||
|
# Nagios. Default is 's'.
|
||||||
|
# @param [String] ng_host_int_check_delay The host inter-check delay method
|
||||||
|
# for Nagios. Default is 's'.
|
||||||
|
# @param [String] ng_max_host_check_spread The maximum host check spread for
|
||||||
|
# Nagios. Default is '30'.
|
||||||
|
# @param [String] ng_max_concurrent_checks The maximum number of concurrent checks
|
||||||
|
# for Nagios. Default is '0'.
|
||||||
|
# @param [String] ng_check_res_reaper_freq The check result reaper frequency for
|
||||||
|
# Nagios. Default is '10'.
|
||||||
|
# @param [String] ng_max_check_res_reap_time The maximum check result reaper time
|
||||||
|
# for Nagios. Default is '30'.
|
||||||
################################################################################
|
################################################################################
|
||||||
class confdroid_nagios::params (
|
class confdroid_nagios::params (
|
||||||
|
|
||||||
@@ -158,6 +192,23 @@ class confdroid_nagios::params (
|
|||||||
String $ng_log_rotation_method = 'd',
|
String $ng_log_rotation_method = 'd',
|
||||||
String $ng_use_syslog = '1',
|
String $ng_use_syslog = '1',
|
||||||
String $ng_log_notifications = '1',
|
String $ng_log_notifications = '1',
|
||||||
|
String $ng_log_service_retries = '1',
|
||||||
|
String $ng_log_host_retries = '1',
|
||||||
|
String $ng_log_event_handlers = '1',
|
||||||
|
String $ng_log_initial_states = '0',
|
||||||
|
String $ng_log_current_states = '1',
|
||||||
|
String $ng_log_external_commands = '1',
|
||||||
|
String $ng_log_passive_checks = '1',
|
||||||
|
Array $ng_glob_host_evt_handler = [],
|
||||||
|
Array $ng_glob_svc_evt_handler = [],
|
||||||
|
String $ng_svc_int_check_delay = 's',
|
||||||
|
String $ng_max_svc_check_spread = '30',
|
||||||
|
String $ng_svc_interleave_factor = 's',
|
||||||
|
String $ng_host_int_check_delay = 's',
|
||||||
|
String $ng_max_host_check_spread = '30',
|
||||||
|
String $ng_max_concurrent_checks = '0',
|
||||||
|
String $ng_check_res_reaper_freq = '10',
|
||||||
|
String $ng_max_check_res_reap_time = '30',
|
||||||
|
|
||||||
# cgi.cfg
|
# cgi.cfg
|
||||||
String $ng_context_help = '1',
|
String $ng_context_help = '1',
|
||||||
|
|||||||
@@ -54,184 +54,33 @@ log_archive_path=<%= @ng_log_archives %>
|
|||||||
use_syslog=<%= @ng_use_syslog %>
|
use_syslog=<%= @ng_use_syslog %>
|
||||||
log_notifications=<%= @ng_log_notifications %>
|
log_notifications=<%= @ng_log_notifications %>
|
||||||
|
|
||||||
|
log_service_retries=<%= @ng_log_service_retries %>
|
||||||
|
log_host_retries=<%= @ng_log_host_retries %>
|
||||||
|
log_event_handlers=<%= @ng_log_event_handlers %>
|
||||||
|
log_initial_states=<%= @ng_log_initial_states %>
|
||||||
|
log_current_states=<%= @ng_log_current_states %>
|
||||||
|
log_external_commands=<%= @ng_log_external_commands %>
|
||||||
|
log_passive_checks=<%= @ng_log_passive_checks %>
|
||||||
|
|
||||||
# SERVICE RETRY LOGGING OPTION
|
<% unless @ng_glob_host_evt_handler.empty? -%>
|
||||||
# If you don't want service check retries to be logged, set this value
|
<% @ng_glob_host_evt_handler.each do |global_host_event_handler| -%>
|
||||||
# to 0. If retries should be logged, set the value to 1.
|
global_host_event_handler=<%= @ng_glob_host_evt_handler %>
|
||||||
|
<% end end -%>
|
||||||
|
<% unless @ng_glob_svc_evt_handler.empty? -%>
|
||||||
|
<% @ng_glob_svc_evt_handler.each do |global_service_event_handler| -%>
|
||||||
|
global_service_event_handler=<%= @ng_glob_svc_evt_handler %>
|
||||||
|
<% end end -%>
|
||||||
|
|
||||||
log_service_retries=1
|
service_inter_check_delay_method=<%= @ng_svc_int_check_delay %>
|
||||||
|
max_service_check_spread=<%= @ng_max_svc_check_spread %>
|
||||||
|
service_interleave_factor=<%= @ng_svc_interleave_factor %>
|
||||||
|
|
||||||
|
host_inter_check_delay_method=<%= @ng_host_int_check_delay %>
|
||||||
|
max_host_check_spread=<%= @ng_max_host_check_spread %>
|
||||||
|
|
||||||
|
max_concurrent_checks=<%= @ng_max_concurrent_checks %>
|
||||||
# HOST RETRY LOGGING OPTION
|
check_result_reaper_frequency=<%= @ng_check_res_reaper_freq %>
|
||||||
# If you don't want host check retries to be logged, set this value to
|
max_check_result_reaper_time=<%= @ng_max_check_res_reap_time %>
|
||||||
# 0. If retries should be logged, set the value to 1.
|
|
||||||
|
|
||||||
log_host_retries=1
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# EVENT HANDLER LOGGING OPTION
|
|
||||||
# If you don't want host and service event handlers to be logged, set
|
|
||||||
# this value to 0. If event handlers should be logged, set the value
|
|
||||||
# to 1.
|
|
||||||
|
|
||||||
log_event_handlers=1
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# INITIAL STATES LOGGING OPTION
|
|
||||||
# If you want Nagios to log all initial host and service states to
|
|
||||||
# the main log file (the first time the service or host is checked)
|
|
||||||
# you can enable this option by setting this value to 1. If you
|
|
||||||
# are not using an external application that does long term state
|
|
||||||
# statistics reporting, you do not need to enable this option. In
|
|
||||||
# this case, set the value to 0.
|
|
||||||
|
|
||||||
log_initial_states=0
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# CURRENT STATES LOGGING OPTION
|
|
||||||
# If you don't want Nagios to log all current host and service states
|
|
||||||
# after log has been rotated to the main log file, you can disable this
|
|
||||||
# option by setting this value to 0. Default value is 1.
|
|
||||||
|
|
||||||
log_current_states=1
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# EXTERNAL COMMANDS LOGGING OPTION
|
|
||||||
# If you don't want Nagios to log external commands, set this value
|
|
||||||
# to 0. If external commands should be logged, set this value to 1.
|
|
||||||
# Note: This option does not include logging of passive service
|
|
||||||
# checks - see the option below for controlling whether or not
|
|
||||||
# passive checks are logged.
|
|
||||||
|
|
||||||
log_external_commands=1
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# PASSIVE CHECKS LOGGING OPTION
|
|
||||||
# If you don't want Nagios to log passive host and service checks, set
|
|
||||||
# this value to 0. If passive checks should be logged, set
|
|
||||||
# this value to 1.
|
|
||||||
|
|
||||||
log_passive_checks=1
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# GLOBAL HOST AND SERVICE EVENT HANDLERS
|
|
||||||
# These options allow you to specify a host and service event handler
|
|
||||||
# command that is to be run for every host or service state change.
|
|
||||||
# The global event handler is executed immediately prior to the event
|
|
||||||
# handler that you have optionally specified in each host or
|
|
||||||
# service definition. The command argument is the short name of a
|
|
||||||
# command definition that you define in your host configuration file.
|
|
||||||
# Read the HTML docs for more information.
|
|
||||||
|
|
||||||
#global_host_event_handler=somecommand
|
|
||||||
#global_service_event_handler=somecommand
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# SERVICE INTER-CHECK DELAY METHOD
|
|
||||||
# This is the method that Nagios should use when initially
|
|
||||||
# "spreading out" service checks when it starts monitoring. The
|
|
||||||
# default is to use smart delay calculation, which will try to
|
|
||||||
# space all service checks out evenly to minimize CPU load.
|
|
||||||
# Using the dumb setting will cause all checks to be scheduled
|
|
||||||
# at the same time (with no delay between them)! This is not a
|
|
||||||
# good thing for production, but is useful when testing the
|
|
||||||
# parallelization functionality.
|
|
||||||
# n = None - don't use any delay between checks
|
|
||||||
# d = Use a "dumb" delay of 1 second between checks
|
|
||||||
# s = Use "smart" inter-check delay calculation
|
|
||||||
# x.xx = Use an inter-check delay of x.xx seconds
|
|
||||||
|
|
||||||
service_inter_check_delay_method=s
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# MAXIMUM SERVICE CHECK SPREAD
|
|
||||||
# This variable determines the timeframe (in minutes) from the
|
|
||||||
# program start time that an initial check of all services should
|
|
||||||
# be completed. Default is 30 minutes.
|
|
||||||
|
|
||||||
max_service_check_spread=30
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# SERVICE CHECK INTERLEAVE FACTOR
|
|
||||||
# This variable determines how service checks are interleaved.
|
|
||||||
# Interleaving the service checks allows for a more even
|
|
||||||
# distribution of service checks and reduced load on remote
|
|
||||||
# hosts. Setting this value to 1 is equivalent to how versions
|
|
||||||
# of Nagios previous to 0.0.5 did service checks. Set this
|
|
||||||
# value to s (smart) for automatic calculation of the interleave
|
|
||||||
# factor unless you have a specific reason to change it.
|
|
||||||
# s = Use "smart" interleave factor calculation
|
|
||||||
# x = Use an interleave factor of x, where x is a
|
|
||||||
# number greater than or equal to 1.
|
|
||||||
|
|
||||||
service_interleave_factor=s
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# HOST INTER-CHECK DELAY METHOD
|
|
||||||
# This is the method that Nagios should use when initially
|
|
||||||
# "spreading out" host checks when it starts monitoring. The
|
|
||||||
# default is to use smart delay calculation, which will try to
|
|
||||||
# space all host checks out evenly to minimize CPU load.
|
|
||||||
# Using the dumb setting will cause all checks to be scheduled
|
|
||||||
# at the same time (with no delay between them)!
|
|
||||||
# n = None - don't use any delay between checks
|
|
||||||
# d = Use a "dumb" delay of 1 second between checks
|
|
||||||
# s = Use "smart" inter-check delay calculation
|
|
||||||
# x.xx = Use an inter-check delay of x.xx seconds
|
|
||||||
|
|
||||||
host_inter_check_delay_method=s
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# MAXIMUM HOST CHECK SPREAD
|
|
||||||
# This variable determines the timeframe (in minutes) from the
|
|
||||||
# program start time that an initial check of all hosts should
|
|
||||||
# be completed. Default is 30 minutes.
|
|
||||||
|
|
||||||
max_host_check_spread=30
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# MAXIMUM CONCURRENT SERVICE CHECKS
|
|
||||||
# This option allows you to specify the maximum number of
|
|
||||||
# service checks that can be run in parallel at any given time.
|
|
||||||
# Specifying a value of 1 for this variable essentially prevents
|
|
||||||
# any service checks from being parallelized. A value of 0
|
|
||||||
# will not restrict the number of concurrent checks that are
|
|
||||||
# being executed.
|
|
||||||
|
|
||||||
max_concurrent_checks=0
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# HOST AND SERVICE CHECK REAPER FREQUENCY
|
|
||||||
# This is the frequency (in seconds!) that Nagios will process
|
|
||||||
# the results of host and service checks.
|
|
||||||
|
|
||||||
check_result_reaper_frequency=10
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# MAX CHECK RESULT REAPER TIME
|
|
||||||
# This is the max amount of time (in seconds) that a single
|
|
||||||
# check result reaper event will be allowed to run before
|
|
||||||
# returning control back to Nagios so it can perform other
|
|
||||||
# duties.
|
|
||||||
|
|
||||||
max_check_result_reaper_time=30
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user