1012 lines
54 KiB
Puppet
1012 lines
54 KiB
Puppet
## cd_nagios::params.pp
|
|
# Module name: cd_nagios
|
|
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
|
|
# # License:
|
|
# This file is part of cd_nagios.
|
|
#
|
|
# cd_nagios is used for providing automatic configuration of Nagios.
|
|
# Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com)
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
# @summary Class holds all parameters for the cd_nagios module and is
|
|
# inherited by all classes except defines.
|
|
# @see https://confdroid.com/2017/07/nagios-cgi-cfg/
|
|
# @param [string] pkg_ensure
|
|
# which [package type](https://confdroid.com/2017/05/puppet-type-package/)
|
|
# to choose, i.e. `latest` or `present`.
|
|
# @param [string] ng_nagios_server Specify the FQDN of the nagios server host.
|
|
# Must be a proper A-name, no CNAME i.e. on Loadbalancers. When the FQDN
|
|
# matches the configured value, Nagios server components will be installed
|
|
# and the clients will allow to be connected by that host. Impacts also
|
|
# firewall ports (optional).
|
|
# @param [string] ng_nagios_ext_ip Specify the IP address of the
|
|
# nagios server. Required for NRPE configuration to allow the Nagios server
|
|
# to connect to NRPE, which as of now does not trust DNS names. Must be the
|
|
# public interface in case of NAT environments.
|
|
# @param [boolean] ng_include_nrpe Whether to include NRPE to allow
|
|
# Nagios to connect to clients
|
|
# @param [string] ng_ping_warn Default value for ping warning check. Can be
|
|
# overridden on host level.
|
|
# @param [string] ng_ping_crit Default value for ping critical check. Can be
|
|
# overridden on host level.
|
|
# @param [boolean] ng_ping_ensure Whether to include or exclude the check.
|
|
# Can be overridden on host level.
|
|
# @param [string] ng_disk_warn Default value for disk space warning check.
|
|
# Can be overridden on host level.
|
|
# @param [string] ng_disk_crit Default value for disk space critical check
|
|
# Can be overridden on host level.
|
|
# @param [boolean] ng_disk_ensure Whether to include or exclude the check.
|
|
# Can be overridden on host level.
|
|
# @param [string] ng_swap_warn Default value for swap space warning check.
|
|
# Can be overridden on host level.
|
|
# @param [string] ng_swap_crit Default value for swap space critical check.
|
|
# Can be overridden on host level.
|
|
# @param [boolean] ng_swap_ensure Whether to include or exclude the check.
|
|
# Can be overridden on host level.
|
|
# @param [string] ng_users_warn Default value for user logins warning check.
|
|
# Can be overridden on host level.
|
|
# @param [string] ng_users_crit Default value for user logins critical check
|
|
# Can be overridden on host level.
|
|
# @param [boolean] ng_users_ensure Whether to include or exclude the check.
|
|
# Can be overridden on host level.
|
|
# @param [string] ng_procs_tot_warn Default warning for the total processes
|
|
# warning check. Can be overridden on host level.
|
|
# @param [string] ng_procs_tot_crit Default warning for the total processes
|
|
# critical check. Can be overridden on host level.
|
|
# @param [string] ng_procs_tot_param Default value for the process flags to be
|
|
# checked. Can be overridden on host level.
|
|
# @param [boolean] ng_procs_tot_ens Whether to include or exclude the check.
|
|
# Can be overridden on host level.
|
|
# @param [string] ng_procs_z_warn Default value for the zombie processes
|
|
# warning check. Can be overridden on host level.
|
|
# @param [string] ng_procs_z_crit Default value for the zombie processess
|
|
# critical check. Can be overridden on host level.
|
|
# @param [string] ng_procs_z_param Default value for the zombie processes flag.
|
|
# Can be overridden on host level.
|
|
# @param [boolean] ng_procs_z_ensure Whether to include or exclude the check.
|
|
# Can be overridden on host level.
|
|
# @param [string] ng_load_warn Default value for the load warning check.
|
|
# Can be overridden on host level.
|
|
# @param [string] ng_load_crit Default value for the load critical check.
|
|
# Can be overridden on host level.
|
|
# @param [boolean] ng_load_ensure Whether to include or exclude the load check.
|
|
# Can be overridden on host level.
|
|
# @param [boolean] ng_include_fw Whether to include firewall management.
|
|
# requires cd_firewall or puppetlabs-firewall module.
|
|
# @param [string] ng_fw_order Prefix for the port number to establish proper
|
|
# firewall rule ordering.
|
|
# @param [boolean] ng_use_https Whether to use https.
|
|
# @param [boolean] ng_http_https_fw Whether we want to forward http to https.
|
|
# only active if `ng_use_https` is set to `true`.
|
|
# @param [string] ng_http_port Specify the port to use for httpd. Used in
|
|
# templates and for firewall (Optional)
|
|
# @param [string] ng_https_port Specify the port to use for httpd. Used in
|
|
# templates and for firewall (Optional)
|
|
# @param [string] ng_user The name of the Nagios service user.
|
|
# @param [string] ng_user_home The home directory for the Nagios service user
|
|
# @param [string] ng_user_shell The shell for the Nagios service user, which
|
|
# never should be allowed to login.
|
|
# @param [string] ng_u_comment The comment for the Nagios service user for
|
|
# /etc/passwd. Shows up in email notifocations from the Nagios daemon.
|
|
# @param [string] ng_u_uid The UID for the Nagios service user. Important when
|
|
# using shared environments like NFS.
|
|
# @param [string] ng_u_groups The secondary groups for the Nagios service user.
|
|
# Must not contain the primary group.
|
|
# @param [string] ng_context_help whether or not a context-sensitive
|
|
# help icon will be displayed for most of the CGIs.
|
|
# @param [string] ng_pending_state what states should be displayed in the web
|
|
# interface for hosts/services that have not yet been checked
|
|
# @param [string] ng_use_auth whether or not the CGIs will use any
|
|
# authentication when displaying host and service information, as
|
|
# well as committing commands to Nagios for processing. This should
|
|
# **__not__** be set to 0.
|
|
# @param [string] ng_use_ssl_auth allows you to use x509 cert (SSL)
|
|
# authentication in the CGIs. This is an advanced option and should
|
|
# not be enabled unless you know what you're doing.
|
|
# @param [boolean] ng_enable_def_user Whether to enable a default user
|
|
# (**__not recommended__**).
|
|
# @param [string] ng_def_user_name default user name that can
|
|
# access pages without authentication. This allows people within a
|
|
# secure domain (i.e., behind a firewall) to see the current status
|
|
# without authenticating. Only actuve if `ng_enable_def_user` is set to `true`
|
|
# @param [string] ng_nagios_admin Specify the name of a nagios administration
|
|
# user here. Value will be used in cgi.cfg for all authorized commands and
|
|
# info,i.e. nagiosadmin. however, its stronlgly suggested to use a different
|
|
# name. Can be overridden per host / hostgroups to allow flexibility and
|
|
# increased security. You can also add a comma-separated list of people in
|
|
# here instead, which then would function like a group instead a single user.
|
|
# @param [string] ng_sysinfo_auth comma-delimited list of all usernames that
|
|
# have access to viewing the Nagios process information as
|
|
# provided by the Extended Information CGI (extinfo.cgi).
|
|
# @param [string] ng_confinfo_auth comma-delimited list of all usernames that
|
|
# can view ALL configuration information (hosts, commands, etc).
|
|
# @param [string] ng_command_auth comma-delimited list of all usernames that
|
|
# can issue shutdown and restart commands to Nagios via the
|
|
# command CGI (cmd.cgi).
|
|
# @param [string] ng_hostview_auth comma-delimited lists of all usernames that
|
|
# can view information for all hosts
|
|
# @param [string] ng_serviceview_auth comma-delimited lists of all usernames
|
|
# that can view information for all services.
|
|
# @param [string] ng_host_cmd_auth comma-delimited lists of all usernames that
|
|
# can issue host related commands.
|
|
# @param [string] ng_svc_cmd_auth comma-delimited lists of all usernames that
|
|
# can issue service related commands.
|
|
# @param [string] ng_readonly_auth comma-delimited list of usernames that have
|
|
# read-only rights in the CGIs.
|
|
# @param [string] ng_statusmap_img specify an image to be used as a
|
|
# background in the statusmap CGI.
|
|
# @param [boolean] ng_use_colormap Whether to set values of background colors.
|
|
# @param [string] ng_colormap_red value for the `red` area of the color map.
|
|
# @param [string] ng_colormap_green value for the `green` area of the color map
|
|
# @param [string] ng_colormap_blue value for the `blue` area of the color map.
|
|
# @param [string] ng_statusmap_layout Value for the default statusmap layout.
|
|
# @param [string] ng_wrl_layout Value for the default statuswrl layout.
|
|
# @param [boolean] ng_incl_own_wrl Whether to include your own objects in the
|
|
# generated VRML world.
|
|
# @param [string] ng_statuswrl_include Specify your own wrl object to be
|
|
# included in the generated VRML world. Only active if `ng_incl_own_wrl`
|
|
# is set to `true`.
|
|
# @param [string] ng_ping_syntax what syntax should be used when
|
|
# attempting to ping a host from the WAP interface
|
|
# @param [string] ng_refresh_rate specify the refresh rate in seconds
|
|
# of various CGIs
|
|
# @param [string] ng_result_limit specify the default number of results
|
|
# displayed on the status.cgi.
|
|
# @param [string] ng_escape_html whether HTML tags in host and service
|
|
# status output is escaped in the web interface. If enabled,
|
|
# your plugin output will not be able to contain clickable links.
|
|
# @param [boolean] ng_use_sound whether to enable sound usage.
|
|
# @param [string] ng_host_unreachable soundfile for `host unreachable`
|
|
# Only active if `ng_use_sound` is set to `true`.
|
|
# @param [string] ng_host_down soundfile for `host down`
|
|
# Only active if `ng_use_sound` is set to `true`.
|
|
# @param [string] ng_svc_critical soundfile for `service critical`.
|
|
# Only active if `ng_use_sound` is set to `true`.
|
|
# @param [string] ng_svc_warn soundfile for `service warning`
|
|
# Only active if `ng_use_sound` is set to `true`.
|
|
# @param [string] ng_svc_unknown soundfile for `service unknown`
|
|
# Only active if `ng_use_sound` is set to `true`.
|
|
# @param [string] ng_normal_sound soundfile for `normal`
|
|
# Only active if `ng_use_sound` is set to `true`.
|
|
# @param [string] ng_action_url_target Specify target frames in which
|
|
# action URLs will open
|
|
# @param [string] ng_notes_url_target Specify target frames in which
|
|
# notes URLs will open
|
|
# @param [string] ng_lock_author_names whether users can change the author
|
|
# name when submitting comments, scheduling downtime.
|
|
# @param [boolean] ng_enable_splunk Whether to enable splunk integration.
|
|
# @param [string] ng_splunk_url the URL for your Splunk URL
|
|
# @param [string] ng_navbar_addresses allow navbar search queries IP addresses
|
|
# @param [string] ng_navbar_aliases allow navbar search for aliases
|
|
# @param [string] ng_ack_no_sticky Enabling ack_no_sticky will default the
|
|
# "Sticky Acknowledgement" to be unchecked.
|
|
# @param [string] ng_ack_no_send Enabling ack_no_send will default the
|
|
# "Send Notification" to be unchecked.
|
|
# @param [boolean] ng_use_selinux_tools Whether to enable selinux tools and
|
|
# policies. only effective if selinux is enabled.
|
|
# @param [string] ng_required_hosts String of **__FQDNs__** for hosts which
|
|
# should be allowed/required. Requires format
|
|
# 'host1.example.com host2.example.com'. If you want no restriction, chose
|
|
# 'all'.
|
|
# @param [string] ng_required_ips string of **__Ip addresses __** for hosts
|
|
# which should be allowed/reqired. Requires format 'ipaddress ip address
|
|
# range'. If you want no restriction, choose '0.0.0.0/0'.
|
|
# @param [boolean] ng_enable_certbot Whether to use certbot for automated TLS
|
|
# certificate management
|
|
# @param [string] ng_certbot_webroot the path for certbot to place
|
|
# challenges for the certification process.
|
|
# @param [string] ng_mail_user email address to receive administrative mail.
|
|
# used for nagios itself as well as for certbot. Mail environment must be
|
|
# configured separately, i.e. through `cd_postfix`.
|
|
# @param [string] ng_page_user pager address to be used by Nagios for
|
|
# notifications. Paging environment must be configured separately.
|
|
# @param [boolean] ng_enable_index Whether to create an index file to allow
|
|
# httpd checks with nagios on the nagios server.
|
|
# @param [string] ng_webserver_name the name of the web server nagios should
|
|
# listen to, i.e. 'nagios.example.net'. Unlike `ng_nagios_server`, this
|
|
# should not be the FQDN of the nagios host, but a web server domain name.
|
|
# required for certbot and used in the web templates.
|
|
# @param [string] ng_log_file main log file where service- and host events
|
|
# are logged.
|
|
# @param [string] ng_max_check_attempts maximum amount of checks done by nagios
|
|
# @param [string] ng_object_cache_file determines where object definitions are
|
|
# cached when # Nagios starts/restarts.
|
|
# @param [string] ng_precached_obj_file determines the location of the
|
|
# precached object file.
|
|
# @param [string] ng_resource_file resource file that contains $USERx$ macro
|
|
# definitions.
|
|
# @param [string] ng_status_file where the current status of all monitored
|
|
# services and hosts is stored.
|
|
# @param [string] ng_status_upd_interval status file update interval.
|
|
# determines the frequency (in seconds) that # Nagios will periodically dump
|
|
# program, host, and # service status data.
|
|
# @param [string] ng_check_ext_commands allows you to specify whether or not
|
|
# Nagios should check # for external commands in the command file specified
|
|
# by `ng_command_file`.
|
|
# @param [string] ng_command_file file that Nagios checks for external command
|
|
# requests. It is also where the command CGI will write commands that are
|
|
# submitted # by users, so it must be writeable by the user that the web
|
|
# server is running as.
|
|
# @param [boolean] ng_enable_query_handler Whether to enable the query handler
|
|
# for running nagios in cluster mode.
|
|
# @param [string] ng_query_socket the socket for the query handler
|
|
# @param [string] ng_lock_file lockfile that Nagios will use to store its PID
|
|
# number in when it is running in daemon mode.
|
|
# @param [string] ng_temp_file temporary file that is used as scratch space
|
|
# when Nagios # updates the status log, cleans the comment file, etc.
|
|
# @param [string] ng_temp_path path where Nagios can create temp files for
|
|
# service and # host check results, etc.
|
|
# @param [string] ng_event_broker_options Controls what (if any) data gets sent
|
|
# to the event broker.
|
|
# @param [string] ng_event_broker_module specify an event broker
|
|
# (including full path) module that should # by loaded by Nagios at startup.
|
|
# Specify multiple modules as array ['path/to/module1','/path/to/module2']
|
|
# @param [string] ng_log_rotation_method Valid options:
|
|
# n = None - don't rotate the log
|
|
# h = Hourly rotation (top of the hour)
|
|
# d = Daily rotation (midnight every day)
|
|
# w = Weekly rotation (midnight on Saturday evening)
|
|
# m = Monthly rotation (midnight last day of month)
|
|
# @param [string] ng_log_archive_path directory where archived (rotated)
|
|
# log files should be # placed (assuming you've chosen to do log rotation).
|
|
# @param [string] ng_use_syslog whether to log messages to the syslog
|
|
# facility, as well as the Nagios log file. Valid options are `0` and `1`.
|
|
# @param [string] ng_log_notifications Whether to log notifications in addition
|
|
# to regular messages. Valid options are `0` and `1`.
|
|
# @param [string] ng_log_service_retries Whether to log service retries.
|
|
# Valid options are `0` and `1`.
|
|
# @param [string] ng_log_host_retries Whether to log host retries.
|
|
# Valid options are `0` and `1`.
|
|
# @param [string] ng_log_event_handlers Whether to log host and service event
|
|
# handlers. Valid options are `0` and `1`.
|
|
# @param [string] ng_log_initial_states Whether to log initial states.
|
|
# Valid options are `0` and `1`.
|
|
# @param [string] ng_log_current_states Whether to log all current host and
|
|
# service states to the main log file after log has been rotated.
|
|
# Valid options are `0` and `1`.
|
|
# @param [string] ng_log_external_commands Whether to log external commands.
|
|
# Valid options are `0` and `1`.
|
|
# @param [string] ng_log_passive_checks Whether to log passive checks.
|
|
# Valid options are `0` and `1`.
|
|
# @param [string] ng_glob_host_evt_handler Specify a global host 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.
|
|
# @param [string] ng_glob_svc_evt_handler Specify a global 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.
|
|
# @param [string] ng_svc_int_check_delay method that Nagios should use when
|
|
# initially "spreading out" service checks when it starts monitoring.
|
|
# Valid options:
|
|
# 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
|
|
# @param [string] ng_max_svc_check_spread timeframe (in minutes) from the
|
|
# program start time that an initial check of all services should be completed
|
|
# @param [string] ng_svc_interleave_factor determines how service checks are
|
|
# interleaved. Valid options: s = Use "smart" interleave factor calculation
|
|
# x = Use an interleave factor of x, where x is greater than or equal to 1.
|
|
# @param [string] ng_host_int_check_delay method that Nagios should use when
|
|
# initially "spreading out" host checks when it starts monitoring.
|
|
# Valid options:
|
|
# 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
|
|
# @param [string] ng_max_host_check_spread timeframe (in minutes) from the
|
|
# program start time that an initial check of all hosts should # be completed.
|
|
# @param [string] ng_max_concurrent_checks specify the maximum number of
|
|
# service checks that can be run in parallel at any given time. A value of 0
|
|
# will not restrict the number of concurrent checks that are being executed.
|
|
# @param [string] ng_check_res_reaper_freq frequency (in seconds!) in which
|
|
# Nagios will process the results of host and service checks.
|
|
# @param [string] ng_max_check_res_reap_time 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.
|
|
# @param [string] ng_check_result_path directory where Nagios stores the
|
|
# results of host and service checks that have not yet been processed.
|
|
# @param [string] ng_max_check_res_file_age maximum age (in seconds) which
|
|
# check result files are considered to be valid.
|
|
# @param [string] ng_cached_h_check_horizon maximum amount of time (in seconds)
|
|
# that the state of a previous host check is considered current.
|
|
# Cached host states (from host checks that were performed more recently
|
|
# that the timeframe specified by this value) can immensely improve
|
|
# performance in regards to the host check logic. Too high of a value for
|
|
# this option may result in inaccurate host states being used by Nagios,
|
|
# while a lower value may result in a performance hit for host checks.
|
|
# Use a value of 0 to disable host check caching.
|
|
# @param [string] ng_cached_s_check_horizon maximum amount of time (in seconds)
|
|
# that the state of a previous service check is considered current.
|
|
# Cached service states (from service checks that were performed more recently
|
|
# that the timeframe specified by this value) can immensely improve
|
|
# performance in regards to the service check logic. Too high of a value for
|
|
# this option may result in inaccurate service states being used by Nagios,
|
|
# while a lower value may result in a performance hit for service checks.
|
|
# Use a value of 0 to disable service check caching.
|
|
# @param [string] ng_pred_host_dep_checks Whether Nagios will attempt to
|
|
# execute checks of hosts when it predicts that future dependency logic test
|
|
# may be needed. Valid options are `0` and `1`.
|
|
# @param [string] ng_pred_svc_dep_checks Whether Nagios will attempt to execute
|
|
# checks of services when it predicts that future dependency logic test may be
|
|
# needed. Valid options are `0` and `1`.
|
|
# @param [string] ng_soft_state_dependencies Whether or not Nagios will use
|
|
# soft state information when checking host and service dependencies.
|
|
# Valid options are `0` and `1`.
|
|
# @param [string] ng_time_change_threshold when Nagios will react to detected
|
|
# changes in system time (either forward or backwards).
|
|
# @param [string] ng_auto_reschedule_checks Whether Nagios will attempt to
|
|
# automatically reschedule active host and service checks to
|
|
# "smooth" them out over time. Experimental feature.
|
|
# Valid options are `0` and `1`.
|
|
# @param [string] ng_auto_reschedule_intval how often (in seconds) Nagios will
|
|
# attempt to automatically reschedule checks. only has an effect if
|
|
# `ng_auto_reschedule_checks` is set to `1`.
|
|
# @param [string] ng_auto_reschedule_window determines the "window" of time
|
|
# (in seconds) that # Nagios will look at when automatically rescheduling
|
|
# checks. Only host and service checks that occur in the next X seconds
|
|
# (determined by this variable) will be rescheduled.
|
|
# @param [string] ng_service_check_timeout how much time Nagios will allow
|
|
# service check commands to execute before killing them off.
|
|
# @param [string] ng_host_check_timeout how much time Nagios will allow
|
|
# host check commands to execute before killing them off.
|
|
# @param [string] ng_event_handler_timeout how much time Nagios will allow
|
|
# event handler commands to execute before killing them off.
|
|
# @param [string] ng_notification_timeout how much time Nagios will allow
|
|
# notification commands to execute before killing them off.
|
|
# @param [string] ng_ocsp_timeout how much time Nagios will allow
|
|
# ocsp commands to execute before killing them off.
|
|
# @param [string] ng_perfdata_timeout how much time Nagios will allow
|
|
# performance data commands to execute before killing them off.
|
|
# @param [string] ng_retain_state_inf Whether Nagios will save state
|
|
# information for services and hosts before it shuts down. Upon
|
|
# startup Nagios will reload all saved service and host state information
|
|
# before starting to monitor. Valid options are `0` and `1`.
|
|
# @param [string] ng_state_retention_file Where Nagios should use to store
|
|
# host and # service state information before it shuts down. The state
|
|
# information in this file is also read immediately prior to starting to
|
|
# monitor the network when Nagios is restarted. This file is used only if
|
|
# the `ng_retain_state_inf` variable is set to 1.
|
|
# @param [string] ng_retention_update_intval how often (in minutes) that
|
|
# Nagios # will automatically save retention data during normal operation.
|
|
# If you set this value to 0, Nagios will not save retention data at regular
|
|
# interval, but it will still save retention data before shutting down or
|
|
# restarting. If you have disabled state retention, this option has no effect.
|
|
# @param [string] ng_use_ret_program_state Whether Nagios will set
|
|
# program status variables based on the values saved in the retention file.
|
|
# Valid options are `0` and `1`.
|
|
# @param [string] ng_use_ret_scheduling_info Whether Nagios will retain
|
|
# the scheduling info (next check time) for hosts and services based on the
|
|
# values saved in the retention file. Valid options are `0` and `1`.
|
|
# @param [string] ng_ret_host_attr_mask mask determines what host
|
|
# attributes are not retained
|
|
# @param [string] ng_ret_service_attr_mask mask determines what service
|
|
# attributes are not retained
|
|
# @param [string] ng_ret_proc_host_attr_mask what host process attributes
|
|
# are not retained.
|
|
# @param [string] ng_ret_proc_svc_attr_mask what service process attributes
|
|
# are not retained
|
|
# @param [string] ng_ret_contact_h_attr_mask what host contact attributes are
|
|
# not retained.
|
|
# @param [string] ng_ret_contact_s_attr_mask what service contact attributes
|
|
# are not retained.
|
|
# @param [string] ng_interval_length seconds per unit interval as used in the
|
|
# host/contact/service configuration files.
|
|
# @param [string] ng_check_for_updates whether Nagios will automatically check
|
|
# to see if new updates (releases) are available. Effectively, setting
|
|
# `$pkg_ensure` to `latest` will have Puppet take care for that automatically
|
|
# though through the packages available in the yum repos.
|
|
# Valid options are `0` and `1`.
|
|
# @param [string] ng_bare_update_check what data Nagios will send to
|
|
# api.nagios.org when it checks for updates. Valid options are `0` and `1`.
|
|
# @param [string] ng_use_aggr_host_checking Whether to enable aggressive host
|
|
# checking. Read Nagios documentation for more infos aggressive host checking.
|
|
# @param [string] ng_execute_service_checks Whether Nagios will actively
|
|
# execute service checks when it initially starts.
|
|
# Valid options are `0` and `1`.
|
|
# @param [string] ng_accept_pass_svc_checks Whether or not Nagios will accept
|
|
# passive # service checks results when it initially (re)starts.
|
|
# Valid options are `0` and `1`.
|
|
# @param [string] ng_execute_host_checks whether or not Nagios will actively
|
|
# execute host checks when it initially starts.
|
|
# Valid options are `0` and `1`.
|
|
# @param [string] ng_accept_pass_host_checks Whether or not Nagios will accept
|
|
# passive # host checks results when it initially (re)starts.
|
|
# Valid options are `0` and `1`.
|
|
# @param [string] ng_enable_notifications Whether Nagios will sent out any host
|
|
# or service notifications when it is initially (re)started.
|
|
# Valid options are `0` and `1`.
|
|
# @param [string] ng_enable_event_handlers Whether Nagios will run any host or
|
|
# service event handlers when it is initially (re)started.
|
|
# Valid options are `0` and `1`.
|
|
# @param [string] ng_process_perf_data Whether Nagios will process performance
|
|
# data returned from service and host checks.
|
|
# Valid options are `0` and `1`.
|
|
# @param [string] ng_host_perfdata_command Short name of a command definition
|
|
# defined in your host configuration file. Only active if
|
|
# `ng_process_perf_data` is set to `1`
|
|
# @param [string] ng_svc_perfdata_command Short name of a command definition
|
|
# defined in your service configuration file. Only active if
|
|
# `ng_process_perf_data` is set to `1`
|
|
# @param [string] ng_host_perfdata_file used to store host performance data.
|
|
# Only active if `ng_process_perf_data` is set to `1`
|
|
# @param [string] ng_service_perfdata_file used to store service performance
|
|
# data. Only active if `ng_process_perf_data` is set to `1`
|
|
# @param [string] ng_host_perfdata_template 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. Only active if `ng_process_perf_data` is set to `1`
|
|
# @param [string] ng_svc_perfdata_template 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. Only active if `ng_process_perf_data` is set to `1`
|
|
# @param [string] ng_host_perfdata_file_mode Whether the host performance data
|
|
# files are opened in write ("w"), append ("a") or named pipe ("p") mode.
|
|
# Only active if `ng_process_perf_data` is set to `1`.
|
|
# @param [string] ng_svc_perfdata_file_mode Whether the service performance
|
|
# data files are opened in write ("w"), append ("a") or named pipe ("p") mode.
|
|
# Only active if `ng_process_perf_data` is set to `1`.
|
|
# @param [string] ng_h_perfdata_proc_intval How often (in seconds) the host
|
|
# performance data files are processed using the commands defined below.
|
|
# `0` indicates that the files should not be periodically processed.
|
|
# Only active if `ng_process_perf_data` is set to `1`.
|
|
# @param [string] ng_s_perfdata_proc_intval How often (in seconds) the service
|
|
# performance data files are processed using the commands defined below.
|
|
# `0` indicates that the files should not be periodically processed.
|
|
# Only active if `ng_process_perf_data` is set to `1`.
|
|
# @param [string] ng_h_perfdata_proc_cmd Commands used to periodically process
|
|
# the host performance data files.
|
|
# Only active if `ng_process_perf_data` is set to `1`.
|
|
# @param [string] ng_s_perfdata_proc_cmd Commands used to periodically process
|
|
# the service performance data files.
|
|
# Only active if `ng_process_perf_data` is set to `1`.
|
|
# @param [string] ng_h_perfdata_proc_e_res Whether the core will process empty
|
|
# host perfdata results. Valid options are `0` and `1`.
|
|
# Only active if `ng_process_perf_data` is set to `1`.
|
|
# @param [string] ng_s_perfdata_proc_e_res Whether the core will process empty
|
|
# service perfdata results. Valid options are `0` and `1`.
|
|
# Only active if `ng_process_perf_data` is set to `1`.
|
|
# @param [string] ng_obsess_over_services Whether Nagios will obsess over
|
|
# service checks and run the ocsp_command defined. Unless you are
|
|
# planning on implementing distributed monitoring, do not enable this option.
|
|
# @param [string] ng_ocsp_command Command that is run for every service check
|
|
# that is processed by Nagios. This command is executed only if the
|
|
# `ng_obsess_over_services` option is set to 1. The command argument is the
|
|
# short name of a command definition defined in your service configuration
|
|
# file. Read the HTML docs for # more information on implementing distributed
|
|
# monitoring.
|
|
# @param [string] ng_obsess_over_hosts Whether Nagios will obsess over
|
|
# host checks and run the ocsp_command defined. Unless you are
|
|
# planning on implementing distributed monitoring, do not enable this option.
|
|
# @param [string] ng_ochp_command Command that is run for every service check
|
|
# that is processed by Nagios. This command is executed only if the
|
|
# `ng_obsess_over_hosts` option is set to 1. The command argument is the
|
|
# short name of a command definition defined in your host configuration file.
|
|
# Read the HTML docs for # more information on implementing distributed
|
|
# monitoring.
|
|
# @param [string] ng_translate_pass_h_checks Whether or not Nagios will
|
|
# translate # DOWN/UNREACHABLE passive host check results into their proper
|
|
# state for this instance of Nagios. This option is useful only if you have
|
|
# distributed or failover monitoring setup. Valid options are `0` and `1`.
|
|
# @param [string] ng_pass_h_checks_are_soft Whether Nagios will treat passive
|
|
# host checks as being HARD or SOFT. Valid options are `0` and `1`.
|
|
# @param [string] ng_check_orphaned_svc Whether Nagios will periodically check
|
|
# for orphaned service checks.Valid options are `0` and `1`.
|
|
# @param [string] ng_check_orphaned_hosts Whether Nagios will periodically
|
|
# check for orphaned host checks.Valid options are `0` and `1`.
|
|
# @param [string] ng_check_service_freshness Whether Nagios will periodically
|
|
# check the "freshness" of service results. Valid options are `0` and `1`.
|
|
# @param [string] ng_svc_fresh_check_intval how often (in seconds) Nagios will
|
|
# check the "freshness" of service check results. Only active if
|
|
# `ng_check_service_freshness` is set to `1`.
|
|
# @param [string] ng_svc_check_timeout_state The state Nagios will report when
|
|
# a service check times out - that is does not respond within
|
|
# `ng_service_check_timeout` seconds. Valid settings are:
|
|
# c - Critical (default)
|
|
# u - Unknown
|
|
# w - Warning
|
|
# o - OK
|
|
# @param [string] ng_check_host_freshness Whether Nagios will periodically
|
|
# check the "freshness" of host check results. Valid options are `0` and `1`.
|
|
# @param [string] ng_host_fresh_check_intval how often (in seconds) Nagios
|
|
# will check the "freshness" of host check results. Only active if
|
|
# `ng_check_service_freshness` is set to `1`.
|
|
# @param [string] ng_add_freshness_latency number of seconds that Nagios will
|
|
# add to any host and service freshness thresholds that it calculates
|
|
# (those not explicitly specified by the user).
|
|
# @param [string] ng_enable_flap_detection Whether or not Nagios will try
|
|
# and detect hosts and services that are "flapping". Flapping occurs when a
|
|
# host or service changes between # states too frequently. When Nagios
|
|
# detects that a # host or service is flapping, it will temporarily suppress
|
|
# notifications for that host/service until it stops flapping.
|
|
# @param [string] ng_low_svc_flap_threshold Low threshold for service flapping.
|
|
# only active if `ng_enable_flap_detection` is set to `1`.
|
|
# @param [string] ng_high_svc_flap_threshold High threshold for service
|
|
# flapping. Only active if `ng_enable_flap_detection` is set to `1`.
|
|
# @param [string] ng_low_h_flap_threshold Low threshold for host flapping.
|
|
# only active if `ng_enable_flap_detection` is set to `1`.
|
|
# @param [string] ng_high_h_flap_threshold High threshold for host
|
|
# flapping. Only active if `ng_enable_flap_detection` is set to `1`.
|
|
# @param [string] ng_date_format How short dates are displayed.
|
|
# Valid options include:
|
|
# us (MM-DD-YYYY HH:MM:SS)
|
|
# euro (DD-MM-YYYY HH:MM:SS)
|
|
# iso8601 (YYYY-MM-DD HH:MM:SS)
|
|
# strict-iso8601 (YYYY-MM-DDTHH:MM:SS)
|
|
# @param [boolean] ng_use_timezone_offset Whether to use timezone offsets.
|
|
# if set to `false`, the system configured timezone will be used.
|
|
# @param [string] ng_use_timezone used to override the default timezone that
|
|
# this # instance of Nagios runs in. If not specified, Nagios will use the
|
|
# system configured timezone. NOTE: In order to display the correct timezone
|
|
# in the CGIs, you # will also need to alter the Apache directives for the
|
|
# CGI path # to include your timezone. It is highly recommended to configure
|
|
# the timezone correctly at system level anyway. Only active if
|
|
# `ng_use_timezone_offset` is set to `true`.
|
|
# @param [string] ng_illegal_obj_name_chars specify illegal characters that
|
|
# cannot # be used in host names, service descriptions, or names of other
|
|
# object types.
|
|
# @param [string] ng_ill_macro_output_chars Specify illegal characters that
|
|
# are stripped from macros before being used in notifications, event handlers,
|
|
# etc. This DOES NOT affect macros used in service or host check commands.
|
|
# The following macros are stripped of the characters you specify:
|
|
# $HOSTOUTPUT$
|
|
# $HOSTPERFDATA$
|
|
# $HOSTACKAUTHOR$
|
|
# $HOSTACKCOMMENT$
|
|
# $SERVICEOUTPUT$
|
|
# $SERVICEPERFDATA$
|
|
# $SERVICEACKAUTHOR$
|
|
# $SERVICEACKCOMMENT$
|
|
# @param [string] ng_use_regexp_matching Whether regular expression
|
|
# matching takes place in the object config files. Regular expression
|
|
# matching is used to match host, hostgroup, service, and service group
|
|
# names/descriptions in some fields of various object types.
|
|
# Valid options are `0` and `1`.
|
|
# @param [string] ng_true_regexp_matching Whether or not "true" regular
|
|
# expression # matching takes place in the object config files. Only active if
|
|
# `ng_use_regexp_matching` is set to true.
|
|
# @param [string] ng_daemon_dumps_core Whether Nagios is allowed to create
|
|
# a core dump when it runs as a daemon.
|
|
# @param [string] ng_use_large_inst_tweaks Whether or not Nagios will take some
|
|
# shortcuts # which can save on memory and CPU usage in large Nagios
|
|
# installations. Valid options are `0` or `1`.
|
|
# @param [string] ng_enable_env_macros Whether Nagios will make all standard
|
|
# macros available as environment variables when host/service checks and
|
|
# system commands (event handlers, notifications, etc.) are executed. Can
|
|
# cause performance problems in large installations if enabled.
|
|
# Valid options are `0` or `1`.
|
|
# @param [string] ng_free_child_process_mem Whether Nagios should free up
|
|
# memory on child processes. Valid options are `0` and `1`.
|
|
# @param [string] ng_child_proc_fork_twice ow Nagios will fork child processes.
|
|
# Valid options are `0` or `1`.
|
|
# @param [string] ng_debug_level how much (if any) debugging information will
|
|
# be written to the debug file. Valid options are:
|
|
# -1 = Everything
|
|
# 0 = Nothing
|
|
# 1 = Functions
|
|
# 2 = Configuration
|
|
# 4 = Process information
|
|
# 8 = Scheduled events
|
|
# 16 = Host/service checks
|
|
# 32 = Notifications
|
|
# 64 = Event broker
|
|
# 128 = External commands
|
|
# 256 = Commands
|
|
# 512 = Scheduled downtime
|
|
# 1024 = Comments
|
|
# 2048 = Macros
|
|
# @param [string] ng_debug_verbosity How verbose the debug log out will be.
|
|
# Valid options:
|
|
# 0 = Brief output
|
|
# 1 = More detailed
|
|
# 2 = Very detailed
|
|
# @param [string] ng_debug_file FQDN where Nagios should write debug
|
|
# information.
|
|
# @param [string] ng_max_debug_file_size Maximum size (in bytes) of the debug
|
|
# file. If the file grows larger than this size, it will be renamed with
|
|
# a .old # extension. If a file already exists with a .old extension it will
|
|
# automatically be deleted.
|
|
# @param [string] ng_allow_empty_hostgroups Should we allow hostgroups to have
|
|
# no hosts, we default this to off since that was the old behavior.
|
|
# @param [string] ng_check_workers Normally worker count is dynamically
|
|
# allocated based on 1.5 * number of cpu's with a minimum of 4 workers.
|
|
# This value will override the defaults.
|
|
# @param [string] ng_host_down_svc_checks This option will disable all service
|
|
# checks if the host is not in an UP state. While desirable in some
|
|
# environments, enabling this value can distort report values as the expected
|
|
# quantity of checks will not have been performed. Valid options are `0` and
|
|
# `1`.
|
|
# @param [boolean] ng_enable_load_ctl_options Whether to enable loadctl_options
|
|
# To get current defaults based on your system issue a command to
|
|
# the query handler. Experiemental feature and not recomended for production.
|
|
# @param [string] ng_loadctl_options load controlling options
|
|
# jobs_max - The maximum amount of jobs to run at one time
|
|
# jobs_min - The minimum amount of jobs to run at one time
|
|
# jobs_limit - The maximum amount of jobs the current load lets us run
|
|
# backoff_limit - The minimum backoff_change
|
|
# backoff_change - # of jobs to remove from jobs_limit when backing off
|
|
# rampup_limit - Minimum rampup_change
|
|
# rampup_change - # of jobs to add to jobs_limit when ramping up
|
|
# @param [string] ng_nrpe_port the port for NRPE. used by firewall and in
|
|
# configuration file.
|
|
# @param [boolean] ng_enable_swap_check Whether to enable the declaration of
|
|
# the swap check. Disabling thi smakes sense when you use the `cd_swap`
|
|
# Puppet module and have enabled the check declaration from there, so the
|
|
# Nagios check is properly aligned to the Puppet module controlling the
|
|
# particular item.
|
|
###############################################################################
|
|
class cd_nagios::params (
|
|
|
|
$pkg_ensure = 'latest',
|
|
|
|
$ng_nagios_server = "nagios.${::domain}",
|
|
$ng_nagios_ext_ip = undef,
|
|
$ng_mail_user = "admin@${::domain}",
|
|
$ng_page_user = "pageadmin@${::domain}",
|
|
|
|
$ng_include_nrpe = true,
|
|
|
|
# firewall
|
|
$ng_include_fw = true,
|
|
$ng_use_https = true,
|
|
$ng_http_https_fw = true,
|
|
$ng_fw_order = '50',
|
|
$ng_http_port = '80',
|
|
$ng_https_port = '443',
|
|
$ng_nrpe_port = '5666',
|
|
|
|
# check command parameters
|
|
## ping
|
|
$ng_ping_warn = '100.0,20%',
|
|
$ng_ping_crit = '500.0,60%',
|
|
$ng_ping_ensure = 'present',
|
|
## disk
|
|
$ng_disk_warn = '20%',
|
|
$ng_disk_crit = '10%' ,
|
|
$ng_disk_ensure = 'present',
|
|
# swap
|
|
$ng_swap_warn = '20',
|
|
$ng_swap_crit = '10',
|
|
$ng_swap_ensure = 'present',
|
|
# users
|
|
$ng_users_warn = '20',
|
|
$ng_users_crit = '50',
|
|
$ng_users_ensure = 'present',
|
|
#total procs
|
|
$ng_procs_tot_warn = '330',
|
|
$ng_procs_tot_crit = '400',
|
|
$ng_procs_tot_param = 'RDST',
|
|
$ng_procs_tot_ens = 'present',
|
|
# zombie procs
|
|
$ng_procs_z_warn = '10',
|
|
$ng_procs_z_crit = '30',
|
|
$ng_procs_z_param = 'Z',
|
|
$ng_procs_z_ensure = 'present',
|
|
# load
|
|
$ng_load_warn = '5.00,4.00,3.00',
|
|
$ng_load_crit = '10.00,6.00,4.00',
|
|
$ng_load_ensure = 'present',
|
|
|
|
# user settings
|
|
$ng_user = 'nagios',
|
|
$ng_u_comment = 'Nagios service user',
|
|
$ng_u_uid = '1004',
|
|
$ng_user_home = '/var/spool/nagios',
|
|
$ng_u_groups = undef,
|
|
$ng_user_shell = '/bin/bash',
|
|
|
|
# cgi settings
|
|
$ng_context_help = '1',
|
|
$ng_pending_state = '1',
|
|
$ng_use_auth = '1',
|
|
$ng_use_ssl_auth = '0',
|
|
$ng_enable_def_user = false,
|
|
$ng_def_user_name = 'nagios_insecure',
|
|
$ng_nagios_admin = 'nagios_sec_adm',
|
|
$ng_sysinfo_auth = '',
|
|
$ng_confinfo_auth = '',
|
|
$ng_command_auth = '',
|
|
$ng_hostview_auth = '',
|
|
$ng_serviceview_auth = '',
|
|
$ng_host_cmd_auth = '',
|
|
$ng_svc_cmd_auth = '',
|
|
$ng_readonly_auth = '' ,
|
|
$ng_statusmap_img = 'smbackground.gd2',
|
|
$ng_use_colormap = false,
|
|
$ng_colormap_red = '255',
|
|
$ng_colormap_green = '255',
|
|
$ng_colormap_blue = '255',
|
|
$ng_statusmap_layout = '6',
|
|
$ng_wrl_layout = '4',
|
|
$ng_incl_own_wrl = false,
|
|
$ng_statuswrl_include = '',
|
|
$ng_ping_syntax = '/bin/ping -n -U -c 5 $HOSTADDRESS$',
|
|
$ng_refresh_rate = '90',
|
|
$ng_result_limit = '100',
|
|
$ng_escape_html = '1',
|
|
$ng_use_sound = false,
|
|
$ng_host_unreachable = 'hostdown.wav',
|
|
$ng_host_down = 'hostdown.wav',
|
|
$ng_svc_critical = 'critical.wav',
|
|
$ng_svc_warn = 'warning.wav',
|
|
$ng_svc_unknown = 'warning.wav',
|
|
$ng_normal_sound = 'noproblem.wav',
|
|
$ng_action_url_target = '_blank',
|
|
$ng_notes_url_target = '_blank',
|
|
$ng_lock_author_names = '1',
|
|
$ng_enable_splunk = false,
|
|
$ng_splunk_url = 'http://127.0.0.1:8000/',
|
|
$ng_navbar_addresses = '1',
|
|
$ng_navbar_aliases = '1',
|
|
$ng_ack_no_sticky = '0',
|
|
$ng_ack_no_send = '0',
|
|
|
|
# selinux
|
|
$ng_use_selinux_tools = true,
|
|
|
|
# httpd
|
|
$ng_required_hosts = '',
|
|
$ng_required_ips = '127.0.0.0/8',
|
|
$ng_enable_index = true,
|
|
|
|
# certbot
|
|
$ng_enable_certbot = true,
|
|
$ng_certbot_webroot = '/var/www/html',
|
|
$ng_webserver_name = "nagios.${::domain}",
|
|
|
|
# main settings
|
|
$ng_log_file = '/var/log/nagios/nagios.log',
|
|
$ng_max_check_attempts = '10',
|
|
$ng_object_cache_file = '/var/spool/nagios/objects.cache',
|
|
$ng_precached_obj_file = '/var/spool/nagios/objects.precache',
|
|
$ng_resource_file = '/etc/nagios/private/resource.cfg',
|
|
$ng_status_file = '/var/log/nagios/status.dat',
|
|
$ng_status_upd_interval = '10',
|
|
$ng_check_ext_commands = '1',
|
|
$ng_command_file = '/var/spool/nagios/cmd/nagios.cmd',
|
|
$ng_enable_query_handler = false,
|
|
$ng_query_socket = '/var/spool/nagios/cmd/nagios.qh',
|
|
$ng_lock_file = '/var/run/nagios/nagios.pid',
|
|
$ng_temp_file = '/var/spool/nagios/nagios.tmp',
|
|
$ng_temp_path = '/tmp',
|
|
$ng_event_broker_options = '-1',
|
|
$ng_event_broker_module = '',
|
|
$ng_log_rotation_method = 'h',
|
|
$ng_log_archive_path = '/var/log/nagios/archives',
|
|
$ng_use_syslog = '1',
|
|
$ng_log_notifications = '1',
|
|
$ng_log_service_retries = '1',
|
|
$ng_log_host_retries = '1',
|
|
$ng_log_event_handlers = '1',
|
|
$ng_log_initial_states = '0',
|
|
$ng_log_current_states = '1',
|
|
$ng_log_external_commands = '1',
|
|
$ng_log_passive_checks = '1',
|
|
$ng_glob_host_evt_handler = '',
|
|
$ng_glob_svc_evt_handler = '',
|
|
$ng_svc_int_check_delay = 's',
|
|
$ng_max_svc_check_spread = '30',
|
|
$ng_svc_interleave_factor = 's',
|
|
$ng_host_int_check_delay = 's',
|
|
$ng_max_host_check_spread = '30',
|
|
$ng_max_concurrent_checks = '0',
|
|
$ng_check_res_reaper_freq = '10',
|
|
$ng_max_check_res_reap_time = '30',
|
|
$ng_check_result_path = '/var/spool/nagios/checkresults',
|
|
$ng_max_check_res_file_age = '3600',
|
|
$ng_cached_h_check_horizon = '15',
|
|
$ng_cached_s_check_horizon = '15',
|
|
$ng_pred_host_dep_checks = '1',
|
|
$ng_pred_svc_dep_checks = '1',
|
|
$ng_soft_state_dependencies = '0',
|
|
$ng_time_change_threshold = '900',
|
|
$ng_auto_reschedule_checks = '0',
|
|
$ng_auto_reschedule_intval = '30',
|
|
$ng_auto_reschedule_window = '180',
|
|
$ng_service_check_timeout = '60',
|
|
$ng_host_check_timeout = '30',
|
|
$ng_event_handler_timeout = '30',
|
|
$ng_notification_timeout = '30',
|
|
$ng_ocsp_timeout = '5',
|
|
$ng_perfdata_timeout = '5',
|
|
$ng_retain_state_inf = '1',
|
|
$ng_state_retention_file = '/var/spool/nagios/retention.dat',
|
|
$ng_retention_update_intval = '60',
|
|
$ng_use_ret_program_state = '1',
|
|
$ng_use_ret_scheduling_info = '1',
|
|
$ng_ret_host_attr_mask = '0',
|
|
$ng_ret_service_attr_mask = '0',
|
|
$ng_ret_proc_host_attr_mask = '0',
|
|
$ng_ret_proc_svc_attr_mask = '0',
|
|
$ng_ret_contact_h_attr_mask = '0',
|
|
$ng_ret_contact_s_attr_mask = '0',
|
|
$ng_interval_length = '60',
|
|
$ng_check_for_updates = '1',
|
|
$ng_bare_update_check = '0',
|
|
$ng_use_aggr_host_checking = '0',
|
|
$ng_execute_service_checks = '1',
|
|
$ng_accept_pass_svc_checks = '1',
|
|
$ng_execute_host_checks = '1',
|
|
$ng_accept_pass_host_checks = '1',
|
|
$ng_enable_notifications = '1',
|
|
$ng_enable_event_handlers = '1',
|
|
$ng_process_perf_data = '0',
|
|
$ng_host_perfdata_command = 'process-host-perfdata',
|
|
$ng_svc_perfdata_command = 'process-service-perfdata',
|
|
$ng_host_perfdata_file = '/var/spool/nagios/host-perfdata',
|
|
$ng_service_perfdata_file = '/var/spool/nagios/service-perfdata',
|
|
$ng_host_perfdata_template = '[HOSTPERFDATA]\t$TIMET$\t$HOSTNAME$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$',
|
|
$ng_svc_perfdata_template = '[SERVICEPERFDATA]\t$TIMET$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$',
|
|
$ng_host_perfdata_file_mode = 'a',
|
|
$ng_svc_perfdata_file_mode = 'a',
|
|
$ng_h_perfdata_proc_intval = '0',
|
|
$ng_s_perfdata_proc_intval = '0',
|
|
$ng_h_perfdata_proc_cmd = 'process-host-perfdata-file',
|
|
$ng_s_perfdata_proc_cmd = 'process-service-perfdata-file',
|
|
$ng_h_perfdata_proc_e_res = '1',
|
|
$ng_s_perfdata_proc_e_res = '1',
|
|
$ng_obsess_over_services = '0',
|
|
$ng_ocsp_command = '',
|
|
$ng_obsess_over_hosts = '0',
|
|
$ng_ochp_command = '',
|
|
$ng_translate_pass_h_checks = '0',
|
|
$ng_pass_h_checks_are_soft = '0',
|
|
$ng_check_orphaned_svc = '1',
|
|
$ng_check_orphaned_hosts = '1',
|
|
$ng_check_service_freshness = '1',
|
|
$ng_svc_fresh_check_intval = '60',
|
|
$ng_svc_check_timeout_state = 'c',
|
|
$ng_check_host_freshness = '0',
|
|
$ng_host_fresh_check_intval = '60',
|
|
$ng_add_freshness_latency = '15',
|
|
$ng_enable_flap_detection = '1',
|
|
$ng_low_svc_flap_threshold = '5.0',
|
|
$ng_high_svc_flap_threshold = '20.0',
|
|
$ng_low_h_flap_threshold = '5.0',
|
|
$ng_high_h_flap_threshold = '20.0',
|
|
$ng_date_format = 'us',
|
|
$ng_use_timezone_offset = false,
|
|
$ng_use_timezone = '',
|
|
$ng_illegal_obj_name_chars = '`~!$%^&*|\'"<>?,()=',
|
|
$ng_ill_macro_output_chars = '`~$&|\'"<>',
|
|
$ng_use_regexp_matching = '0',
|
|
$ng_true_regexp_matching = '0',
|
|
$ng_daemon_dumps_core = '0',
|
|
$ng_use_large_inst_tweaks = '0',
|
|
$ng_enable_env_macros = '0',
|
|
$ng_free_child_process_mem = '1',
|
|
$ng_child_proc_fork_twice = '1',
|
|
$ng_debug_level = '0',
|
|
$ng_debug_verbosity = '1',
|
|
$ng_debug_file = '/var/spool/nagios/nagios.debug',
|
|
$ng_max_debug_file_size = '1000000',
|
|
$ng_allow_empty_hostgroups = '0',
|
|
$ng_check_workers = '',
|
|
$ng_host_down_svc_checks = '0',
|
|
$ng_enable_load_ctl_options = false,
|
|
$ng_loadctl_options = 'jobs_max=100;backoff_limit=10;rampup_change=5',
|
|
|
|
# single nagios checks
|
|
$ng_enable_swap_check = true,
|
|
|
|
|
|
) {
|
|
|
|
# installation section
|
|
|
|
$reqpackages_server = $::operatingsystem ? {
|
|
/(?i-mx:centos|fedora|redhat)/ => ['nagios','nagios-devel']
|
|
}
|
|
$reqpackages_client = $::operatingsystem ? {
|
|
/(?i-mx:centos|fedora|redhat)/ => ['net-snmp-utils',
|
|
'nagios-plugins',
|
|
'nagios-plugins-all',
|
|
'nagios-plugins-nrpe',
|
|
'nagios-common']
|
|
}
|
|
|
|
# service
|
|
$ng_service = 'nagios'
|
|
$ae_service = 'httpd'
|
|
|
|
# directories
|
|
$ng_main_dir = '/etc/nagios'
|
|
$ng_conf_d_dir = "${ng_main_dir}/conf.d"
|
|
$ng_objects_dir = "${ng_main_dir}/objects"
|
|
$ng_private_dir = "${ng_main_dir}/private"
|
|
$ng_usr_incl = '/usr/include/nagios'
|
|
$ng_lib_dir = '/usr/lib64/nagios'
|
|
$ng_log_dir = '/var/log/nagios'
|
|
$ng_log_archives = "${ng_log_dir}/archives"
|
|
$ng_spool_dir = '/var/spool/nagios'
|
|
$ng_usr_share = '/usr/share/nagios'
|
|
$ng_share_html = "${ng_usr_share}/html"
|
|
|
|
# files
|
|
$ng_main_config = "${ng_main_dir}/nagios.cfg"
|
|
$ng_cgi_cfg_file = "${ng_main_dir}/cgi.cfg"
|
|
$ng_cgi_cfg_erb = 'cd_nagios/nagios/cgi_cfg.erb'
|
|
$ng_htpasswd_file = "${ng_main_dir}/passwd"
|
|
$ng_htpasswd_head = 'cd_nagios/nagios/htpasswd_head.erb'
|
|
$ng_htpasswd_rule = 'cd_nagios/nagios/htpasswd_rule.erb'
|
|
$ng_taccgi_erb = 'cd_nagios/selinux/taccgi.erb'
|
|
$ng_statcgi_erb = 'cd_nagios/selinux/statuscgi.erb'
|
|
$ng_checknrpe_erb = 'cd_nagios/selinux/checknrpe.erb'
|
|
$ng_checknagios_erb = 'cd_nagios/selinux/checknagios.erb'
|
|
$ng_nagios_conf = '/etc/httpd/conf.d/nagios.conf'
|
|
$ng_nagios_conf_erb = 'cd_nagios/httpd/nagios_conf.erb'
|
|
$ng_welcome_conf = '/etc/httpd/conf.d/welcome.conf'
|
|
$ng_welcome_conf_erb = 'cd_nagios/httpd/welcome_conf.erb'
|
|
$ng_forward_conf = '/etc/httpd/conf.d/nagios_forward.conf'
|
|
$ng_forward_conf_erb = 'cd_nagios/httpd/forward_conf.erb'
|
|
$ng_get_cert_erb = 'cd_nagios/certbot/get_cert.erb'
|
|
$ng_unless_get_cert = 'cd_nagios/certbot/unless_get_cert.erb'
|
|
$ng_unless_renew_erb = 'cd_nagios/certbot/unless_renew_cert.erb'
|
|
$ng_index_html_file = '/var/www/html/index.html'
|
|
$ng_index_html_erb = 'cd_nagios/httpd/index_html.erb'
|
|
$ng_ssl_vhost_file = '/etc/httpd/conf.d/nagios_ssl.conf'
|
|
$ng_ssl_vhost_erb = 'cd_nagios/httpd/nagios_ssl_vhost.erb'
|
|
$ng_nagios_cfg_file = "${ng_main_dir}/nagios.cfg"
|
|
$ng_nagios_cfg_erb = 'cd_nagios/nagios/nagios_cfg.erb'
|
|
|
|
# certbot
|
|
$ng_certbot_main_dir = '/etc/letsencrypt'
|
|
$ng_certbot_archive = "${ng_certbot_main_dir}/archive"
|
|
$ng_certbot_check = "${ng_certbot_archive}/${ng_webserver_name}/cert1.pem"
|
|
$ng_certbot_live = "${ng_certbot_main_dir}/live"
|
|
|
|
# nagios
|
|
$ng_target_templates = "${ng_conf_d_dir}/nagios_templates.cfg"
|
|
$ng_templates_head_erb = 'cd_nagios/nagios/templates_cfg_head.erb'
|
|
$ng_templates_rule_erb = 'cd_nagios/nagios/templates_cfg_rule.erb'
|
|
$ng_tgt_timeperiods_base = "${ng_conf_d_dir}/nagios_timeperiods.cfg"
|
|
$ng_tgt_timep_add = "${ng_conf_d_dir}/nagios_timeperiods_add.cfg"
|
|
$ng_tgt_timep_head_erb = 'cd_nagios/nagios/timeperiods_cfg_head.erb'
|
|
$ng_tgt_timep_rule_erb = 'cd_nagios/nagios/timeperiods_cfg_rule.erb'
|
|
$ng_target_localhost = "${ng_conf_d_dir}/nagios_localhost.cfg"
|
|
$ng_target_host = "${ng_conf_d_dir}/nagios_host.cfg"
|
|
$ng_target_hostgroup_base = "${ng_conf_d_dir}/nagios_hostgroups_base.cfg"
|
|
$ng_tgt_hostgroup_add = "${ng_conf_d_dir}/nagios_hostgroups_add.cfg"
|
|
$ng_tgt_hostgrp_head_erb = 'cd_nagios/nagios/hostgroups_cfg_head.erb'
|
|
$ng_tgt_hostgrp_rule_erb = 'cd_nagios/nagios/hostgroups_cfg_rule.erb'
|
|
$ng_target_hostdep = "${ng_conf_d_dir}/nagios_hostdependency.cfg"
|
|
$ng_target_hostesc = "${ng_conf_d_dir}/nagios_hostescalation.cfg"
|
|
$ng_target_hostext = "${ng_conf_d_dir}/nagios_hostextinfo.cfg"
|
|
$ng_target_service = "${ng_conf_d_dir}/nagios_service.cfg"
|
|
$ng_target_svcgrp_base = "${ng_conf_d_dir}/nagios_servicegroups_base.cfg"
|
|
$ng_tgt_servicegroup_add = "${ng_conf_d_dir}/nagios_servicegroups_add.cfg"
|
|
$ng_tgt_svcgrp_head_erb = 'cd_nagios/nagios/svcgroups_cfg_head.erb'
|
|
$ng_tgt_svcgrp_rule_erb = 'cd_nagios/nagios/svcgroups_cfg_rule.erb'
|
|
$ng_target_base_contact = "${ng_conf_d_dir}/nagios_contact_base.cfg"
|
|
$ng_target_add_contact = "${ng_conf_d_dir}/nagios_contact_add.cfg"
|
|
$ng_contacts_head_erb = 'cd_nagios/nagios/contacts_cfg_head.erb'
|
|
$ng_contacts_rule_erb = 'cd_nagios/nagios/contacts_cfg_rule.erb'
|
|
$ng_tgt_contactgroup_base = "${ng_conf_d_dir}/nagios_contactgroup_base.cfg"
|
|
$ng_tgt_contactgroup_add = "${ng_conf_d_dir}/nagios_contactgroup_add.cfg"
|
|
$ng_cntctgrps_head_erb = 'cd_nagios/nagios/contactgroups_cfg_head.erb'
|
|
$ng_cntctgrps_rule_erb = 'cd_nagios/nagios/contactgroups_cfg_rule.erb'
|
|
$ng_target_command = "${ng_conf_d_dir}/nagios_commands_base.cfg"
|
|
$ng_nagios_service_cmd = 'check_nagios!/var/log/nagios/status.dat!5!/usr/sbin/nagios'
|
|
|
|
|
|
# includes must be last
|
|
|
|
include cd_nagios::main::config
|
|
|
|
}
|