OP#436 more controls
This commit is contained in:
@@ -203,6 +203,52 @@
|
|||||||
# attribute mask for Nagios. Default is '0'.
|
# attribute mask for Nagios. Default is '0'.
|
||||||
# @param [String] ng_ret_contact_s_attr_mask The retention contact service
|
# @param [String] ng_ret_contact_s_attr_mask The retention contact service
|
||||||
# attribute mask for Nagios. Default is '0'.
|
# attribute mask for Nagios. Default is '0'.
|
||||||
|
# @param [String] ng_interval_length The interval length for Nagios.
|
||||||
|
# Default is '60'.
|
||||||
|
# @param [String] ng_check_for_updates Whether to check for updates in Nagios.
|
||||||
|
# Default is '1'.
|
||||||
|
# @param [String] ng_bare_update_check Whether to perform a bare update check
|
||||||
|
# in Nagios. Default is '1'.
|
||||||
|
# @param [String] ng_use_aggr_host_checking Whether to use aggressive host checking
|
||||||
|
# in Nagios. Default is '0'.
|
||||||
|
# @param [String] ng_execute_service_checks Whether to execute service checks in
|
||||||
|
# Nagios at initial start. Default is '1'.
|
||||||
|
# @param [String] ng_accept_pass_svc_checks Whether to accept passive service
|
||||||
|
# checks in Nagios. Default is '1'.
|
||||||
|
# @param [String] ng_execute_host_checks Whether to execute host checks in Nagios
|
||||||
|
# at initial start. Default is '1'.
|
||||||
|
# @param [String] ng_accept_pass_host_checks Whether to accept passive host
|
||||||
|
# checks in Nagios. Default is '1'.
|
||||||
|
# @param [String] ng_enable_notifications Whether to enable notifications in
|
||||||
|
# Nagios when it is initially started. Default is '1'.
|
||||||
|
# @param [String] ng_enable_event_handlers Whether to enable event handlers in
|
||||||
|
# Nagios when it is initially started. Default is '1'.
|
||||||
|
# @param [String] ng_process_perf_data Whether to process performance data in
|
||||||
|
# Nagios when it is initially started. Default is '0'.
|
||||||
|
# @param [String] ng_host_perfdata_command The command to process host
|
||||||
|
# performance data in Nagios. Default is 'process-host-perfdata'.
|
||||||
|
# @param [String] ng_svc_perfdata_command The command to process service
|
||||||
|
# performance data in Nagios. Default is 'process-service-perfdata'.
|
||||||
|
# @param [String] ng_host_perfdata_template The template for host performance
|
||||||
|
# data in Nagios.
|
||||||
|
# @param [String] ng_svc_perfdata_template The template for service performance
|
||||||
|
# data in Nagios.
|
||||||
|
# @param [String] ng_host_perfdata_file_mode The file mode for host performance
|
||||||
|
# data in Nagios. Default is 'a'.
|
||||||
|
# @param [String] ng_svc_perfdata_file_mode The file mode for service performance
|
||||||
|
# data in Nagios. Default is 'a'.
|
||||||
|
# @param [String] ng_h_perfdata_proc_intval The interval for processing host
|
||||||
|
# performance data in Nagios. Default is '0'.
|
||||||
|
# @param [String] ng_s_perfdata_proc_intval The interval for processing service
|
||||||
|
# performance data in Nagios. Default is '0'.
|
||||||
|
# @param [String] ng_h_perfdata_proc_cmd The command to process host performance
|
||||||
|
# data in Nagios. Default is 'process-host-perfdata'.
|
||||||
|
# @param [String] ng_s_perfdata_proc_cmd The command to process service performance
|
||||||
|
# data in Nagios. Default is 'process-service-perfdata'.
|
||||||
|
# @param [String] ng_h_perfdata_proc_e_result The expected result for processing
|
||||||
|
# host performance data in Nagios. Default is '0'.
|
||||||
|
# @param [String] ng_s_perfdata_proc_e_result The expected result for processing
|
||||||
|
# service performance data in Nagios. Default is '0'.
|
||||||
################################################################################
|
################################################################################
|
||||||
class confdroid_nagios::params (
|
class confdroid_nagios::params (
|
||||||
|
|
||||||
@@ -288,6 +334,29 @@ class confdroid_nagios::params (
|
|||||||
String $ng_ret_proc_svc_attr_mask = '0',
|
String $ng_ret_proc_svc_attr_mask = '0',
|
||||||
String $ng_ret_contact_h_attr_mask = '0',
|
String $ng_ret_contact_h_attr_mask = '0',
|
||||||
String $ng_ret_contact_s_attr_mask = '0',
|
String $ng_ret_contact_s_attr_mask = '0',
|
||||||
|
String $ng_interval_length = '60',
|
||||||
|
String $ng_check_for_updates = '1',
|
||||||
|
String $ng_bare_update_check = '1',
|
||||||
|
String $ng_use_aggr_host_checking = '0',
|
||||||
|
String $ng_execute_service_checks = '1',
|
||||||
|
String $ng_accept_pass_svc_checks = '1',
|
||||||
|
String $ng_execute_host_checks = '1',
|
||||||
|
String $ng_accept_pass_host_checks = '1',
|
||||||
|
String $ng_enable_notifications = '1',
|
||||||
|
String $ng_enable_event_handlers = '1',
|
||||||
|
String $ng_process_perf_data = '0',
|
||||||
|
String $ng_host_perfdata_command = 'process-host-perfdata',
|
||||||
|
String $ng_svc_perfdata_command = 'process-service-perfdata',
|
||||||
|
String $ng_host_perfdata_template = '[HOSTPERFDATA]\t$TIMET$\t$HOSTNAME$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$',
|
||||||
|
String $ng_svc_perfdata_template = '[SERVICEPERFDATA]\t$TIMET$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICEEXECUTIONTIME$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$',
|
||||||
|
String $ng_host_perfdata_file_mode = 'a',
|
||||||
|
String $ng_svc_perfdata_file_mode = 'a',
|
||||||
|
String $ng_h_perfdata_proc_intval = '0',
|
||||||
|
String $ng_s_perfdata_proc_intval = '0',
|
||||||
|
String $ng_h_perfdata_proc_cmd = 'process-host-perfdata',
|
||||||
|
String $ng_s_perfdata_proc_cmd = 'process-service-perfdata',
|
||||||
|
String $ng_h_perfdata_proc_e_result = '0',
|
||||||
|
String $ng_s_perfdata_proc_e_result = '0',
|
||||||
|
|
||||||
# cgi.cfg
|
# cgi.cfg
|
||||||
String $ng_context_help = '1',
|
String $ng_context_help = '1',
|
||||||
@@ -408,27 +477,29 @@ class confdroid_nagios::params (
|
|||||||
$ng_temp_file = "${ng_spool_dir}/nagios.tmp"
|
$ng_temp_file = "${ng_spool_dir}/nagios.tmp"
|
||||||
$ng_check_result_path = "${ng_spool_dir}/checkresults"
|
$ng_check_result_path = "${ng_spool_dir}/checkresults"
|
||||||
$ng_state_retention_file = "${ng_spool_dir}/retention.dat"
|
$ng_state_retention_file = "${ng_spool_dir}/retention.dat"
|
||||||
|
$ng_host_perfdata_file = "${ng_log_dir}/host-perfdata"
|
||||||
|
$ng_svc_perfdata_file = "${ng_log_dir}/service-perfdata"
|
||||||
|
|
||||||
## old
|
## old
|
||||||
$ng_taccgi_erb = 'confdroid_nagios/selinux/taccgi.erb'
|
# $ng_taccgi_erb = 'confdroid_nagios/selinux/taccgi.erb'
|
||||||
$ng_statcgi_erb = 'confdroid_nagios/selinux/statuscgi.erb'
|
# $ng_statcgi_erb = 'confdroid_nagios/selinux/statuscgi.erb'
|
||||||
$ng_statdat_erb = 'confdroid_nagios/selinux/statusdat.erb'
|
# $ng_statdat_erb = 'confdroid_nagios/selinux/statusdat.erb'
|
||||||
$ng_checknrpe_erb = 'confdroid_nagios/selinux/checknrpe.erb'
|
# $ng_checknrpe_erb = 'confdroid_nagios/selinux/checknrpe.erb'
|
||||||
$ng_checknagios_erb = 'confdroid_nagios/selinux/checknagios.erb'
|
# $ng_checknagios_erb = 'confdroid_nagios/selinux/checknagios.erb'
|
||||||
$ng_nagios_conf = '/etc/httpd/conf.d/nagios.conf'
|
# $ng_nagios_conf = '/etc/httpd/conf.d/nagios.conf'
|
||||||
$ng_nagios_conf_erb = 'confdroid_nagios/httpd/nagios_conf.erb'
|
# $ng_nagios_conf_erb = 'confdroid_nagios/httpd/nagios_conf.erb'
|
||||||
$ng_welcome_conf = '/etc/httpd/conf.d/welcome.conf'
|
# $ng_welcome_conf = '/etc/httpd/conf.d/welcome.conf'
|
||||||
$ng_welcome_conf_erb = 'confdroid_nagios/httpd/welcome_conf.erb'
|
# $ng_welcome_conf_erb = 'confdroid_nagios/httpd/welcome_conf.erb'
|
||||||
$ng_forward_conf = '/etc/httpd/conf.d/nagios_forward.conf'
|
# $ng_forward_conf = '/etc/httpd/conf.d/nagios_forward.conf'
|
||||||
$ng_forward_conf_erb = 'confdroid_nagios/httpd/forward_conf.erb'
|
# $ng_forward_conf_erb = 'confdroid_nagios/httpd/forward_conf.erb'
|
||||||
$ng_get_cert_erb = 'confdroid_nagios/certbot/get_cert.erb'
|
# $ng_get_cert_erb = 'confdroid_nagios/certbot/get_cert.erb'
|
||||||
$ng_unless_get_cert = 'confdroid_nagios/certbot/unless_get_cert.erb'
|
# $ng_unless_get_cert = 'confdroid_nagios/certbot/unless_get_cert.erb'
|
||||||
$ng_unless_renew_erb = 'confdroid_nagios/certbot/unless_renew_cert.erb'
|
# $ng_unless_renew_erb = 'confdroid_nagios/certbot/unless_renew_cert.erb'
|
||||||
$ng_index_html_file = '/var/www/html/index.html'
|
# $ng_index_html_file = '/var/www/html/index.html'
|
||||||
$ng_index_html_erb = 'confdroid_nagios/httpd/index_html.erb'
|
# $ng_index_html_erb = 'confdroid_nagios/httpd/index_html.erb'
|
||||||
$ng_ssl_vhost_file = '/etc/httpd/conf.d/nagios_ssl.conf'
|
# $ng_ssl_vhost_file = '/etc/httpd/conf.d/nagios_ssl.conf'
|
||||||
$ng_ssl_vhost_erb = 'confdroid_nagios/httpd/nagios_ssl_vhost.erb'
|
# $ng_ssl_vhost_erb = 'confdroid_nagios/httpd/nagios_ssl_vhost.erb'
|
||||||
$ng_grep_erb = 'confdroid_nagios/selinux/grep.erb'
|
# $ng_grep_erb = 'confdroid_nagios/selinux/grep.erb'
|
||||||
|
|
||||||
# includes must be last
|
# includes must be last
|
||||||
include confdroid_nagios::main::config
|
include confdroid_nagios::main::config
|
||||||
|
|||||||
@@ -120,210 +120,36 @@ retained_process_service_attribute_mask=<%= @ng_ret_proc_svc_attr_mask %>
|
|||||||
retained_contact_host_attribute_mask=<%= @ng_ret_contact_h_attr_mask %>
|
retained_contact_host_attribute_mask=<%= @ng_ret_contact_h_attr_mask %>
|
||||||
retained_contact_service_attribute_mask=<%= @ng_ret_contact_s_attr_mask %>
|
retained_contact_service_attribute_mask=<%= @ng_ret_contact_s_attr_mask %>
|
||||||
|
|
||||||
|
interval_length=<%= @ng_interval_length %>
|
||||||
# INTERVAL LENGTH
|
check_for_updates=<%= @ng_check_for_updates %>
|
||||||
# This is the seconds per unit interval as used in the
|
bare_update_check=<%= @ng_bare_update_check %>
|
||||||
# host/contact/service configuration files. Setting this to 60 means
|
|
||||||
# that each interval is one minute long (60 seconds). Other settings
|
use_aggressive_host_checking=<%= @ng_use_aggr_host_checking %>
|
||||||
# have not been tested much, so your mileage is likely to vary...
|
execute_service_checks=<%= @ng_execute_service_checks %>
|
||||||
|
accept_passive_service_checks=<%= @ng_accept_pass_svc_checks %>
|
||||||
interval_length=60
|
execute_host_checks=<%= @ng_execute_host_checks %>
|
||||||
|
accept_passive_host_checks=<%= @ng_accept_pass_host_checks %>
|
||||||
|
|
||||||
|
enable_notifications=<%= @ng_enable_notifications %>
|
||||||
# CHECK FOR UPDATES
|
enable_event_handlers=<%= @ng_enable_event_handlers %>
|
||||||
# This option determines whether Nagios will automatically check to
|
process_performance_data=<%= @ng_process_perf_data %>
|
||||||
# see if new updates (releases) are available. It is recommend that you
|
|
||||||
# enable this option to ensure that you stay on top of the latest critical
|
<% if @ng_process_perf_data == '1' -%>
|
||||||
# patches to Nagios. Nagios is critical to you - make sure you keep it in
|
host_perfdata_command=<%= @ng_host_perfdata_command %>
|
||||||
# good shape. Nagios will check once a day for new updates. Data collected
|
service_perfdata_command=<%= @ng_svc_perfdata_command %>
|
||||||
# by Nagios Enterprises from the update check is processed in accordance
|
host_perfdata_file=<%= @ng_host_perfdata_file %>
|
||||||
# with our privacy policy - see https://api.nagios.org for details.
|
service_perfdata_file=<%= @ng_service_perfdata_file %>
|
||||||
|
host_perfdata_file_template=<%= @ng_host_perfdata_template %>
|
||||||
check_for_updates=1
|
service_perfdata_file_template=<%= @ng_svc_perfdata_template %>
|
||||||
|
host_perfdata_file_mode=<%= @ng_host_perfdata_file_mode %>
|
||||||
|
service_perfdata_file_mode=<%= @ng_svc_perfdata_file_mode %>
|
||||||
|
host_perfdata_file_processing_interval=<%= @ng_h_perfdata_proc_intval %>
|
||||||
# BARE UPDATE CHECK
|
service_perfdata_file_processing_interval=<%= @ng_s_perfdata_proc_intval %>
|
||||||
# This option determines what data Nagios will send to api.nagios.org when
|
host_perfdata_file_processing_command=<%= @ng_h_perfdata_proc_cmd %>
|
||||||
# it checks for updates. By default, Nagios will send information on the
|
service_perfdata_file_processing_command=<%= @ng_s_perfdata_proc_cmd %>
|
||||||
# current version of Nagios you have installed, as well as an indicator as
|
host_perfdata_process_empty_results=<%= @ng_h_perfdata_proc_e_res %>
|
||||||
# to whether this was a new installation or not. Nagios Enterprises uses
|
service_perfdata_process_empty_results=<%= @ng_s_perfdata_proc_e_res %>
|
||||||
# this data to determine the number of users running specific version of
|
<% end -%>
|
||||||
# Nagios. Enable this option if you do not want this information to be sent.
|
|
||||||
|
|
||||||
bare_update_check=0
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# AGGRESSIVE HOST CHECKING OPTION
|
|
||||||
# If you don't want to turn on aggressive host checking features, set
|
|
||||||
# this value to 0 (the default). Otherwise set this value to 1 to
|
|
||||||
# enable the aggressive check option. Read the docs for more info
|
|
||||||
# on what aggressive host check is or check out the source code in
|
|
||||||
# base/checks.c
|
|
||||||
|
|
||||||
use_aggressive_host_checking=0
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# SERVICE CHECK EXECUTION OPTION
|
|
||||||
# This determines whether or not Nagios will actively execute
|
|
||||||
# service checks when it initially starts. If this option is
|
|
||||||
# disabled, checks are not actively made, but Nagios can still
|
|
||||||
# receive and process passive check results that come in. Unless
|
|
||||||
# you're implementing redundant hosts or have a special need for
|
|
||||||
# disabling the execution of service checks, leave this enabled!
|
|
||||||
# Values: 1 = enable checks, 0 = disable checks
|
|
||||||
|
|
||||||
execute_service_checks=1
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# PASSIVE SERVICE CHECK ACCEPTANCE OPTION
|
|
||||||
# This determines whether or not Nagios will accept passive
|
|
||||||
# service checks results when it initially (re)starts.
|
|
||||||
# Values: 1 = accept passive checks, 0 = reject passive checks
|
|
||||||
|
|
||||||
accept_passive_service_checks=1
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# HOST CHECK EXECUTION OPTION
|
|
||||||
# This determines whether or not Nagios will actively execute
|
|
||||||
# host checks when it initially starts. If this option is
|
|
||||||
# disabled, checks are not actively made, but Nagios can still
|
|
||||||
# receive and process passive check results that come in. Unless
|
|
||||||
# you're implementing redundant hosts or have a special need for
|
|
||||||
# disabling the execution of host checks, leave this enabled!
|
|
||||||
# Values: 1 = enable checks, 0 = disable checks
|
|
||||||
|
|
||||||
execute_host_checks=1
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# PASSIVE HOST CHECK ACCEPTANCE OPTION
|
|
||||||
# This determines whether or not Nagios will accept passive
|
|
||||||
# host checks results when it initially (re)starts.
|
|
||||||
# Values: 1 = accept passive checks, 0 = reject passive checks
|
|
||||||
|
|
||||||
accept_passive_host_checks=1
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# NOTIFICATIONS OPTION
|
|
||||||
# This determines whether or not Nagios will sent out any host or
|
|
||||||
# service notifications when it is initially (re)started.
|
|
||||||
# Values: 1 = enable notifications, 0 = disable notifications
|
|
||||||
|
|
||||||
enable_notifications=1
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# EVENT HANDLER USE OPTION
|
|
||||||
# This determines whether or not Nagios will run any host or
|
|
||||||
# service event handlers when it is initially (re)started. Unless
|
|
||||||
# you're implementing redundant hosts, leave this option enabled.
|
|
||||||
# Values: 1 = enable event handlers, 0 = disable event handlers
|
|
||||||
|
|
||||||
enable_event_handlers=1
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# PROCESS PERFORMANCE DATA OPTION
|
|
||||||
# This determines whether or not Nagios will process performance
|
|
||||||
# data returned from service and host checks. If this option is
|
|
||||||
# enabled, host performance data will be processed using the
|
|
||||||
# host_perfdata_command (defined below) and service performance
|
|
||||||
# data will be processed using the service_perfdata_command (also
|
|
||||||
# defined below). Read the HTML docs for more information on
|
|
||||||
# performance data.
|
|
||||||
# Values: 1 = process performance data, 0 = do not process performance data
|
|
||||||
|
|
||||||
process_performance_data=0
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# HOST AND SERVICE PERFORMANCE DATA PROCESSING COMMANDS
|
|
||||||
# These commands are run after every host and service check is
|
|
||||||
# performed. These commands are executed only if the
|
|
||||||
# enable_performance_data option (above) is set to 1. 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 on performance data.
|
|
||||||
|
|
||||||
#host_perfdata_command=process-host-perfdata
|
|
||||||
#service_perfdata_command=process-service-perfdata
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# HOST AND SERVICE PERFORMANCE DATA FILES
|
|
||||||
# These files are used to store host and service performance data.
|
|
||||||
# Performance data is only written to these files if the
|
|
||||||
# enable_performance_data option (above) is set to 1.
|
|
||||||
|
|
||||||
#host_perfdata_file=/var/log/nagios/host-perfdata
|
|
||||||
#service_perfdata_file=/var/log/nagios/service-perfdata
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# HOST AND SERVICE PERFORMANCE DATA FILE TEMPLATES
|
|
||||||
# These options determine what data is written (and how) to the
|
|
||||||
# performance data files. The templates may contain macros, special
|
|
||||||
# characters (\t for tab, \r for carriage return, \n for newline)
|
|
||||||
# and plain text. A newline is automatically added after each write
|
|
||||||
# to the performance data file. Some examples of what you can do are
|
|
||||||
# shown below.
|
|
||||||
|
|
||||||
#host_perfdata_file_template=[HOSTPERFDATA]\t$TIMET$\t$HOSTNAME$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$
|
|
||||||
#service_perfdata_file_template=[SERVICEPERFDATA]\t$TIMET$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# HOST AND SERVICE PERFORMANCE DATA FILE MODES
|
|
||||||
# This option determines whether or not the host and service
|
|
||||||
# performance data files are opened in write ("w") or append ("a")
|
|
||||||
# mode. If you want to use named pipes, you should use the special
|
|
||||||
# pipe ("p") mode which avoid blocking at startup, otherwise you will
|
|
||||||
# likely want the default append ("a") mode.
|
|
||||||
|
|
||||||
#host_perfdata_file_mode=a
|
|
||||||
#service_perfdata_file_mode=a
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# HOST AND SERVICE PERFORMANCE DATA FILE PROCESSING INTERVAL
|
|
||||||
# These options determine how often (in seconds) the host and service
|
|
||||||
# performance data files are processed using the commands defined
|
|
||||||
# below. A value of 0 indicates the files should not be periodically
|
|
||||||
# processed.
|
|
||||||
|
|
||||||
#host_perfdata_file_processing_interval=0
|
|
||||||
#service_perfdata_file_processing_interval=0
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# HOST AND SERVICE PERFORMANCE DATA FILE PROCESSING COMMANDS
|
|
||||||
# These commands are used to periodically process the host and
|
|
||||||
# service performance data files. The interval at which the
|
|
||||||
# processing occurs is determined by the options above.
|
|
||||||
|
|
||||||
#host_perfdata_file_processing_command=process-host-perfdata-file
|
|
||||||
#service_perfdata_file_processing_command=process-service-perfdata-file
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# HOST AND SERVICE PERFORMANCE DATA PROCESS EMPTY RESULTS
|
|
||||||
# These options determine whether the core will process empty perfdata
|
|
||||||
# results or not. This is needed for distributed monitoring, and intentionally
|
|
||||||
# turned on by default.
|
|
||||||
# If you don't require empty perfdata - saving some cpu cycles
|
|
||||||
# on unwanted macro calculation - you can turn that off. Be careful!
|
|
||||||
# Values: 1 = enable, 0 = disable
|
|
||||||
|
|
||||||
#host_perfdata_process_empty_results=1
|
|
||||||
#service_perfdata_process_empty_results=1
|
|
||||||
|
|
||||||
|
|
||||||
# OBSESS OVER SERVICE CHECKS OPTION
|
# OBSESS OVER SERVICE CHECKS OPTION
|
||||||
# This determines whether or not Nagios will obsess over service
|
# This determines whether or not Nagios will obsess over service
|
||||||
|
|||||||
Reference in New Issue
Block a user