OP#436 more controls

This commit is contained in:
2026-03-07 14:10:14 +01:00
parent 1369c33a61
commit 69fec002be
2 changed files with 91 additions and 184 deletions

View File

@@ -249,6 +249,44 @@
# 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'.
# @param [String] ng_obsess_over_services Whether to enable obsessing over
# services in Nagios. Default is '0'.
# @param [String] ng_ocsp_command The command to run for obsessive compulsive
# service processing in Nagios. Default is 'somecommand'.
# @param [String] ng_obsess_over_hosts Whether to enable obsessing over
# hosts in Nagios. Default is '0'.
# @param [String] ng_ochp_command The command to run for obsessive compulsive
# host processing in Nagios. Default is 'somecommand'.
# @param [String] ng_translate_pass_h_checks Whether to translate passive host
# checks in Nagios. Default is '0'.
# @param [String] ng_pass_h_checks_are_soft Whether to treat passive host
# checks as soft in Nagios. Default is '0'.
# @param [String] ng_check_orphaned_svc Whether to check for orphaned service
# checks in Nagios. Default is '1'.
# @param [String] ng_check_orphaned_hosts Whether to check for orphaned host
# checks in Nagios. Default is '1'.
# @param [String] ng_check_service_freshness Whether to check for service
# freshness in Nagios. Default is '1'.
# @param [String] ng_svc_fresh_check_intval The interval for checking service
# freshness in Nagios. Default is '60'.
# @param [String] ng_svc_check_timeout_state The state to set a service to when
# it times out in Nagios. Default is 'c'.
# @param [String] ng_check_host_freshness Whether to check for host freshness in
# Nagios. Default is '1'.
# @param [String] ng_host_fresh_check_intval The interval for checking host
# freshness in Nagios. Default is '60'.
# @param [String] ng_add_freshness_latency The additional latency threshold for
# freshness checks in Nagios. Default is '15'.
# @param [String] ng_enable_flap_detection Whether to enable flap detection in
# Nagios. Default is '1'.
# @param [String] ng_low_svc_flap_threshold The low service flap threshold for
# Nagios. Default is '5.0'.
# @param [String] ng_high_svc_flap_threshold The high service flap threshold for
# Nagios. Default is '20.0'.
# @param [String] ng_low_h_flap_threshold The low host flap threshold for
# Nagios. Default is '5.0'.
# @param [String] ng_high_h_flap_threshold The high host flap threshold for
# Nagios. Default is '20.0'.
################################################################################
class confdroid_nagios::params (
@@ -357,6 +395,25 @@ class confdroid_nagios::params (
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',
String $ng_obsess_over_services = '0',
String $ng_ocsp_command = 'somecommand',
String $ng_obsess_over_hosts = '0',
String $ng_ochp_command = 'somecommand',
String $ng_translate_pass_h_checks = '0',
String $ng_pass_h_checks_are_soft = '0',
String $ng_check_orphaned_svc = '1',
String $ng_check_orphaned_hosts = '1',
String $ng_check_service_freshness = '1',
String $ng_svc_fresh_check_intval = '60',
String $ng_svc_check_timeout_state = 'c',
String $ng_check_host_freshness = '1',
String $ng_host_fresh_check_intval = '60',
String $ng_add_freshness_latency = '15',
String $ng_enable_flap_detection = '1',
String $ng_low_svc_flap_threshold = '5.0',
String $ng_high_svc_flap_threshold = '20.0',
String $ng_low_h_flap_threshold = '5.0',
String $ng_high_h_flap_threshold = '20.0',
# cgi.cfg
String $ng_context_help = '1',

View File

@@ -151,194 +151,44 @@ host_perfdata_process_empty_results=<%= @ng_h_perfdata_proc_e_res %>
service_perfdata_process_empty_results=<%= @ng_s_perfdata_proc_e_res %>
<% end -%>
# OBSESS OVER SERVICE CHECKS OPTION
# This determines whether or not Nagios will obsess over service
# checks and run the ocsp_command defined below. Unless you're
# planning on implementing distributed monitoring, do not enable
# this option. Read the HTML docs for more information on
# implementing distributed monitoring.
# Values: 1 = obsess over services, 0 = do not obsess (default)
obsess_over_services=<%= @ng_obsess_over_services %>
<% if @ng_obsess_over_services == '1' -%>
ocsp_command=<%= @ng_ocsp_command %>
<% end -%>
obsess_over_services=0
obsess_over_hosts=<%= @ng_obsess_over_hosts %>
<% if @ng_obsess_over_hosts == '1' -%>
ochp_command=<%= @ng_ochp_command %>
<% end -%>
translate_passive_host_checks=<%= @ng_translate_pass_h_checks %>
passive_host_checks_are_soft=<%= @ng_pass_h_checks_are_soft %>
check_for_orphaned_services=<%= @ng_check_orphaned_svc %>
check_for_orphaned_hosts=<%= @ng_check_orphaned_hosts %>
check_service_freshness=<%= @ng_check_service_freshness %>
<% if @ng_check_service_freshness == '1' -%>
service_freshness_check_interval=<%= @ng_svc_fresh_check_intval %>
<% end -%>
service_check_timeout_state=<%= @ng_svc_check_timeout_state %>
check_host_freshness=<%= @ng_check_host_freshness %>
<% if @ng_check_host_freshness == '1' -%>
host_freshness_check_interval=<%= @ng_host_fresh_check_intval %>
<% end -%>
additional_freshness_latency=<%= @ng_add_freshness_latency %>
enable_flap_detection=<%= @ng_enable_flap_detection %>
<% if @ng_enable_flap_detection == '1' -%>
low_service_flap_threshold=<%= @ng_low_svc_flap_threshold %>
high_service_flap_threshold=<%= @ng_high_svc_flap_threshold %>
low_host_flap_threshold=<%= @ng_low_h_flap_threshold %>
high_host_flap_threshold=<%= @ng_high_h_flap_threshold %>
<% end -%>
# OBSESSIVE COMPULSIVE SERVICE PROCESSOR COMMAND
# This is the command that is run for every service check that is
# processed by Nagios. This command is executed only if the
# obsess_over_services 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 implementing distributed monitoring.
#ocsp_command=somecommand
# OBSESS OVER HOST CHECKS OPTION
# This determines whether or not Nagios will obsess over host
# checks and run the ochp_command defined below. Unless you're
# planning on implementing distributed monitoring, do not enable
# this option. Read the HTML docs for more information on
# implementing distributed monitoring.
# Values: 1 = obsess over hosts, 0 = do not obsess (default)
obsess_over_hosts=0
# OBSESSIVE COMPULSIVE HOST PROCESSOR COMMAND
# This is the command that is run for every host check that is
# processed by Nagios. This command is executed only if the
# obsess_over_hosts 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 implementing distributed monitoring.
#ochp_command=somecommand
# TRANSLATE PASSIVE HOST CHECKS OPTION
# This determines 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
# if you have distributed or failover monitoring setup. In
# these cases your other Nagios servers probably have a different
# "view" of the network, with regards to the parent/child relationship
# of hosts. If a distributed monitoring server thinks a host
# is DOWN, it may actually be UNREACHABLE from the point of
# this Nagios instance. Enabling this option will tell Nagios
# to translate any DOWN or UNREACHABLE host states it receives
# passively into the correct state from the view of this server.
# Values: 1 = perform translation, 0 = do not translate (default)
translate_passive_host_checks=0
# PASSIVE HOST CHECKS ARE SOFT OPTION
# This determines whether or not Nagios will treat passive host
# checks as being HARD or SOFT. By default, a passive host check
# result will put a host into a HARD state type. This can be changed
# by enabling this option.
# Values: 0 = passive checks are HARD, 1 = passive checks are SOFT
passive_host_checks_are_soft=0
# ORPHANED HOST/SERVICE CHECK OPTIONS
# These options determine whether or not Nagios will periodically
# check for orphaned host service checks. Since service checks are
# not rescheduled until the results of their previous execution
# instance are processed, there exists a possibility that some
# checks may never get rescheduled. A similar situation exists for
# host checks, although the exact scheduling details differ a bit
# from service checks. Orphaned checks seem to be a rare
# problem and should not happen under normal circumstances.
# If you have problems with service checks never getting
# rescheduled, make sure you have orphaned service checks enabled.
# Values: 1 = enable checks, 0 = disable checks
check_for_orphaned_services=1
check_for_orphaned_hosts=1
# SERVICE FRESHNESS CHECK OPTION
# This option determines whether or not Nagios will periodically
# check the "freshness" of service results. Enabling this option
# is useful for ensuring passive checks are received in a timely
# manner.
# Values: 1 = enabled freshness checking, 0 = disable freshness checking
check_service_freshness=1
# SERVICE FRESHNESS CHECK INTERVAL
# This setting determines how often (in seconds) Nagios will
# check the "freshness" of service check results. If you have
# disabled service freshness checking, this option has no effect.
service_freshness_check_interval=60
# SERVICE CHECK TIMEOUT STATE
# This setting determines the state Nagios will report when a
# service check times out - that is does not respond within
# service_check_timeout seconds. This can be useful if a
# machine is running at too high a load and you do not want
# to consider a failed service check to be critical (the default).
# Valid settings are:
# c - Critical (default)
# u - Unknown
# w - Warning
# o - OK
service_check_timeout_state=c
# HOST FRESHNESS CHECK OPTION
# This option determines whether or not Nagios will periodically
# check the "freshness" of host results. Enabling this option
# is useful for ensuring passive checks are received in a timely
# manner.
# Values: 1 = enabled freshness checking, 0 = disable freshness checking
check_host_freshness=0
# HOST FRESHNESS CHECK INTERVAL
# This setting determines how often (in seconds) Nagios will
# check the "freshness" of host check results. If you have
# disabled host freshness checking, this option has no effect.
host_freshness_check_interval=60
# ADDITIONAL FRESHNESS THRESHOLD LATENCY
# This setting determines the number of seconds that Nagios
# will add to any host and service freshness thresholds that
# it calculates (those not explicitly specified by the user).
additional_freshness_latency=15
# FLAP DETECTION OPTION
# This option determines 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. Flap detection is very experimental, so read
# the HTML documentation before enabling this feature!
# Values: 1 = enable flap detection
# 0 = disable flap detection (default)
enable_flap_detection=1
# FLAP DETECTION THRESHOLDS FOR HOSTS AND SERVICES
# Read the HTML documentation on flap detection for
# an explanation of what this option does. This option
# has no effect if flap detection is disabled.
low_service_flap_threshold=5.0
high_service_flap_threshold=20.0
low_host_flap_threshold=5.0
high_host_flap_threshold=20.0
# DATE FORMAT OPTION