From 766bcd4ee445ee5229b0560570d3ce1c85d1a8f8 Mon Sep 17 00:00:00 2001 From: 12ww1160 <12ww1160@confdroid.com> Date: Sat, 14 Feb 2026 19:40:30 +0100 Subject: [PATCH] OP#436 revert to start --- manifests/main/dirs.pp | 312 ++++++++++----------- manifests/params.pp | 528 ------------------------------------ manifests/server/files.pp | 20 +- manifests/server/service.pp | 18 +- 4 files changed, 175 insertions(+), 703 deletions(-) diff --git a/manifests/main/dirs.pp b/manifests/main/dirs.pp index 017c776..3ed7cd7 100644 --- a/manifests/main/dirs.pp +++ b/manifests/main/dirs.pp @@ -9,186 +9,186 @@ class confdroid_nagios::main::dirs ( require confdroid_nagios::main::user # main directory - file { $ng_main_dir: - ensure => directory, - path => $ng_main_dir, - owner => 'root', - group => 'root', - mode => '0755', - selrange => s0, - selrole => object_r, - seltype => nagios_etc_t, - seluser => system_u, - } +# file { $ng_main_dir: +# ensure => directory, +# path => $ng_main_dir, +# owner => 'root', +# group => 'root', +# mode => '0755', +# selrange => s0, +# selrole => object_r, +# seltype => nagios_etc_t, +# seluser => system_u, +# } # /usr/lib64/nagios dir required for plugins - file { $ng_lib_dir: - ensure => directory, - path => $ng_lib_dir, - owner => 'root', - group => 'root', - mode => '0755', - selrange => s0, - selrole => object_r, - seltype => lib_t, - seluser => system_u, - } +# file { $ng_lib_dir: +# ensure => directory, +# path => $ng_lib_dir, +# owner => 'root', +# group => 'root', +# mode => '0755', +# selrange => s0, +# selrole => object_r, +# seltype => lib_t, +# seluser => system_u, +# } # /var/spool/nagios - file { $ng_spool_dir: - ensure => directory, - path => $ng_spool_dir, - owner => $ng_user, - group => $ng_user, - mode => '0755', - selrange => s0, - selrole => object_r, - seltype => nagios_spool_t, - seluser => system_u, - } +# file { $ng_spool_dir: +# ensure => directory, +# path => $ng_spool_dir, +# owner => $ng_user, +# group => $ng_user, +# mode => '0755', +# selrange => s0, +# selrole => object_r, +# seltype => nagios_spool_t, +# seluser => system_u, +# } - if $fqdn == $ng_nagios_server { +# if $fqdn == $ng_nagios_server { # /etc/nagios/conf.d - file { $ng_conf_d_dir: - ensure => directory, - path => $ng_conf_d_dir, - owner => 'root', - group => $ng_user, - mode => '0750', - selrange => s0, - selrole => object_r, - seltype => nagios_etc_t, - seluser => system_u, - } +# file { $ng_conf_d_dir: +# ensure => directory, +# path => $ng_conf_d_dir, +# owner => 'root', +# group => $ng_user, +# mode => '0750', +# selrange => s0, +# selrole => object_r, +# seltype => nagios_etc_t, +# seluser => system_u, +# } # /etc/nagios/objects - file { $ng_objects_dir: - ensure => directory, - path => $ng_objects_dir, - owner => 'root', - group => $ng_user, - mode => '0750', - selrange => s0, - selrole => object_r, - seltype => nagios_etc_t, - seluser => system_u, - } +# file { $ng_objects_dir: +# ensure => directory, +# path => $ng_objects_dir, +# owner => 'root', +# group => $ng_user, +# mode => '0750', +# selrange => s0, +# selrole => object_r, +# seltype => nagios_etc_t, +# seluser => system_u, +# } # /etc/nagios/private - file { $ng_private_dir: - ensure => directory, - path => $ng_private_dir, - owner => 'root', - group => $ng_user, - mode => '0750', - selrange => s0, - selrole => object_r, - seltype => nagios_etc_t, - seluser => system_u, - } +# file { $ng_private_dir: +# ensure => directory, +# path => $ng_private_dir, +# owner => 'root', +# group => $ng_user, +# mode => '0750', +# selrange => s0, +# selrole => object_r, +# seltype => nagios_etc_t, +# seluser => system_u, +# } # include dir - file { $ng_usr_incl: - ensure => directory, - path => $ng_usr_incl, - owner => 'root', - group => 'root', - mode => '0755', - selrange => s0, - selrole => object_r, - seltype => usr_t, - seluser => system_u, - } +# file { $ng_usr_incl: +# ensure => directory, +# path => $ng_usr_incl, +# owner => 'root', +# group => 'root', +# mode => '0755', +# selrange => s0, +# selrole => object_r, +# seltype => usr_t, +# seluser => system_u, +# } # log dir - file { $ng_log_dir: - ensure => directory, - path => $ng_log_dir, - owner => $ng_user, - group => $ng_user, - mode => '0750', - selrange => s0, - selrole => object_r, - seltype => nagios_log_t, - seluser => system_u, - } +# file { $ng_log_dir: +# ensure => directory, +# path => $ng_log_dir, +# owner => $ng_user, +# group => $ng_user, +# mode => '0750', +# selrange => s0, +# selrole => object_r, +# seltype => nagios_log_t, +# seluser => system_u, +# } # log archives - file { $ng_log_archives: - ensure => directory, - path => $ng_log_archives, - owner => $ng_user, - group => $ng_user, - mode => '0750', - selrange => s0, - selrole => object_r, - seltype => nagios_log_t, - seluser => system_u, - } +# file { $ng_log_archives: +# ensure => directory, +# path => $ng_log_archives, +# owner => $ng_user, +# group => $ng_user, +# mode => '0750', +# selrange => s0, +# selrole => object_r, +# seltype => nagios_log_t, +# seluser => system_u, +# } # /usr/share/nagios - file { $ng_usr_share: - ensure => directory, - path => $ng_usr_share, - owner => 'root', - group => 'root', - mode => '0755', - selrange => s0, - selrole => object_r, - seltype => usr_t, - seluser => system_u, - } +# file { $ng_usr_share: +# ensure => directory, +# path => $ng_usr_share, +# owner => 'root', +# group => 'root', +# mode => '0755', +# selrange => s0#, +# selrole => object_r, +# seltype => usr_t, +# seluser => system_u, +# } # /usr/share/nagios/html - file { $ng_share_html: - ensure => directory, - path => $ng_share_html, - owner => 'root', - group => 'root', - mode => '0755', - selrange => s0, - selrole => object_r, - seltype => usr_t, - seluser => system_u, - } +# file { $ng_share_html: +# ensure => directory, +# path => $ng_share_html, +# owner => 'root', +# group => 'root', +# mode => '0755', +# selrange => s0, +# selrole => object_r, +# seltype => usr_t, +# seluser => system_u, +# } # run dir for pid file - file { $ng_run_dir: - ensure => directory, - path => $ng_run_dir, - owner => 'nagios', - group => 'nagios', - mode => '0750', - selrange => s0, - selrole => object_r, - seltype => nagios_var_run_t, - seluser => system_u, - } +# file { $ng_run_dir: +# ensure => directory, +# path => $ng_run_dir, +# owner => 'nagios', +# group => 'nagios', +# mode => '0750', +# selrange => s0, +# selrole => object_r, +# seltype => nagios_var_run_t, +# seluser => system_u, +# } # cmd dir - file { $ng_cmd_dir: - ensure => directory, - path => $ng_cmd_dir, - owner => 'nagios', - group => 'nagios', - mode => '0775', - selrange => s0, - selrole => object_r, - seltype => nagios_spool_t, - seluser => system_u, - } +# file { $ng_cmd_dir: +# ensure => directory, +# path => $ng_cmd_dir, +# owner => 'nagios', +# group => 'nagios', +# mode => '0775', +# selrange => s0, +# selrole => object_r, +# seltype => nagios_spool_t, +# seluser => system_u, +# } # checkresults dir - file { $ng_checkresults_dir: - ensure => directory, - path => $ng_checkresults_dir, - owner => 'nagios', - group => 'nagios', - mode => '0770', - selrange => s0, - selrole => object_r, - seltype => nagios_spool_t, - seluser => system_u, - } - } +# file { $ng_checkresults_dir: +# ensure => directory, +# path => $ng_checkresults_dir, +# owner => 'nagios', +# group => 'nagios', +# mode => '0770', +# selrange => s0, +# selrole => object_r, +# seltype => nagios_spool_t, +# seluser => system_u, +# } +# } } diff --git a/manifests/params.pp b/manifests/params.pp index 546faa1..6647bec 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -30,400 +30,6 @@ # to use HTTPS. Default is false. We recommend using a reverse proxy # with SSL termination in front of the Nagios web interface, so this is # disabled by default. -# @param [String] ng_event_broker_module The event broker module to be -# used in the Nagios configuration. Default is an empty string, which means no event -# broker module will be configured. You can specify a module like 'mod_gearman' -# to enable the Gearman event broker module, for example. -# @param [String] ng_glob_host_evt_handler The global host event handler to be -# used in the Nagios configuration. Default is an empty string, which means no -# global host event handler will be configured. You can specify a command like -# 'notify-host-by-email' to set a global host event handler that sends -# email notifications for host events, for example. -# @param [String] ng_glob_svc_evt_handler The global service event handler to be -# used in the Nagios configuration. Default is an empty string, which means no -# global service event handler will be configured. You can specify a command -# like 'notify-service-by-email' to set a global service event handler that -# sends email notifications for service events, for example. -# @param [String] ng_check_workers The number of check worker processes to be -# configured in the Nagios configuration. Default is an empty string, -# which means no specific number of check worker processes will be -# configured. You can specify a number like '5' to set the number of check worker -# processes to 5, for example. -# @param [String] ng_log_file The path to the Nagios log file. Default is -# '/var/log/nagios/nagios.log'. -# @param [String] ng_object_cache_file The path to the Nagios object cache file. -# Default is '/var/spool/nagios/objects.cache'. -# @param [String] ng_precached_obj_file The path to the Nagios precached object -# file. Default is '/var/spool/nagios/objects.precache'. -# @param [String] ng_resource_file The path to the Nagios resource file. -# Default is '/etc/nagios/private/resource.cfg'. -# @param [String] ng_status_file The path to the Nagios status file. Default is -# '/var/log/nagios/status.dat'. -# @param [String] ng_status_upd_interval The interval for updating the Nagios -# status file. Default is '10'. -# @param [String] ng_check_ext_commands Whether to enable external command -# checking in the Nagios configuration. Default is '1', which means external -# command checking will be enabled. You can set this to '0' to disable external -# command checking if needed. -# @param [String] ng_command_file The path to the Nagios command file. Default -# is '/var/spool/nagios/cmd/nagios.cmd'. -# @param [String] ng_lock_file The path to the Nagios lock file. Default is -# '/var/run/nagios/nagios.pid'. -# @param [String] ng_temp_file The path to the Nagios temporary file. Default -# is '/var/spool/nagios/nagios.tmp'. -# @param [String] ng_temp_path The path to the Nagios temporary directory. Default -# is '/tmp'. -# @param [String] ng_event_broker_options The options for the Nagios event -# broker. Default is '-1', which means no specific options will be -# configured. You can specify options like '--log-level=debug' to set the log level for -# the event broker, for example. -# @param [String] ng_log_rotation_method The method for log rotation in the -# Nagios configuration. Default is 'h', which means hourly log rotation. -# You can set this to 'd' for daily log rotation, 'w' for weekly log rotation, or 'm' -# for monthly log rotation if needed. -# @param [String] ng_log_archive_path The path to the Nagios log archive -# directory. Default is '/var/log/nagios/archives'. -# @param [String] ng_use_syslog Whether to use syslog for logging in the -# Nagios configuration. Default is '1', which means syslog will be used for -# logging. You can set this to '0' to disable syslog logging if needed. -# @param [String] ng_log_notifications Whether to log notifications in the -# Nagios configuration. Default is '1', which means notifications will be -# logged. You can set this to '0' to disable logging of notifications if -# needed. -# @param [String] ng_log_service_retries Whether to log service retries in the -# Nagios configuration. Default is '1', which means service retries will be -# logged. You can set this to '0' to disable logging of service retries if -# needed. -# @param [String] ng_log_host_retries Whether to log host retries in the -# Nagios configuration. Default is '1', which means host retries will be -# logged. You can set this to '0' to disable logging of host retries if -# needed. -# @param [String] ng_log_event_handlers Whether to log event handlers in the -# Nagios configuration. Default is '1', which means event handlers will be -# logged. You can set this to '0' to disable logging of event handlers if -# needed. -# @param [String] ng_log_initial_states Whether to log initial states in the -# Nagios configuration. Default is '0', which means initial states will not -# logged. You can set this to '1' to enable logging of initial states if -# needed. -# @param [String] ng_log_current_states Whether to log current states in the -# Nagios configuration. Default is '1', which means current states will be -# logged. You can set this to '0' to disable logging of current states if -# needed. -# @param [String] ng_log_external_commands Whether to log external commands -# in the Nagios configuration. Default is '1', which means external commands -# will be logged. You can set this to '0' to disable logging of external -# commands if needed. -# @param [String] ng_log_passive_checks Whether to log passive checks in the -# Nagios configuration. Default is '1', which means passive checks will be -# logged. You can set this to '0' to disable logging of passive checks if -# needed. -# @param [String] ng_svc_int_check_delay The interval for delaying service -# checks in the Nagios configuration. Default is 's', which means service -# checks will be delayed until the next scheduled check interval. You can -# set this to a specific number of seconds (e.g., '30') to delay service -# checks by that amount of time if needed. -# @param [String] ng_max_svc_check_spread The maximum spread for service checks -# in the Nagios configuration. Default is '30', which means service checks -# will be spread out over a maximum of 30 seconds. You can set this to a -# different number of seconds if needed to control how service checks are -# distributed over time. -# @param [String] ng_svc_interleave_factor The interleave factor for service -# checks in the Nagios configuration. Default is 's', which means service -# checks will be interleaved based on their scheduled check intervals. -# You can set this to a specific number (e.g., '0.5') to control the degree -# of interleaving for service checks if needed. -# @param [String] ng_host_int_check_delay The interval for delaying host checks -# in the Nagios configuration. Default is 's', which means host checks will -# be delayed until the next scheduled check interval. You can set this to a -# specific number of seconds (e.g., '30') to delay host checks by that -# amount of time if needed. -# @param [String] ng_max_host_check_spread The maximum spread for host checks -# in the Nagios configuration. Default is '30', which means host checks will -# be spread out over a maximum of 30 seconds. You can set this to a different -# number of seconds if needed to control how host checks are distributed -# over time. -# @param [String] ng_max_concurrent_checks The maximum number of concurrent -# checks in the Nagios configuration. Default is '0', which means there is -# no limit in the Nagios configuration. This means that Nagios will allow -# as many concurrent checks as the system can handle. You can set this to a -# specific number (e.g., '10') to limit the number of concurrent checks if -# needed to prevent resource exhaustion. -# @param [String] ng_check_res_reaper_freq The frequency for the check result -# reaper in the Nagios configuration. Default is '10', which means the check -# result reaper will run every 10 seconds. You can set this to a different -# number of seconds if needed to control how often the check result reaper -# runs. -# @param [String] ng_max_check_res_reap_time The maximum time for check result -# reaping in the Nagios configuration. Default is '30', which means check -# results will be reaped if they are older than 30 seconds. You can set this -# to a different number of seconds if needed to control how long check results -# are kept before being reaped. -# @param [String] ng_check_result_path The path to the Nagios check result -# directory. Default is '/var/spool/nagios/checkresults'. -# @param [String] ng_max_check_res_file_age The maximum age for check result -# files in the Nagios configuration. Default is '3600', which means check -# result files will be considered stale and reaped if they are older than -# 3600 seconds (1 hour). You can set this to a different number of -# seconds if needed to control how long check result files are kept before -# being considered stale. -# @param [String] ng_cached_h_check_horizon The cached host check horizon in the -# Nagios configuration. Default is '15', which means host check results will -# be cached for 15 seconds. You can set this to a different number of seconds -# if needed to control how long host check results are cached. -# @param [String] ng_cached_s_check_horizon The cached service check horizon in the -# Nagios configuration. Default is '15', which means service check results will -# be cached for 15 seconds. You can set this to a different number of seconds -# if needed to control how long service check results are cached. -# @param [String] ng_pred_host_dep_checks Whether to perform predictive host -# dependency checks in the Nagios configuration. Default is '1', which means -# predictive host dependency checks will be performed. You can set this to -# '0' to disable predictive host dependency checks. Predictive host dependency -# checks can help reduce false positives by checking the status of parent -# hosts before determining the status of child hosts. -# @param [String] ng_pred_svc_dep_checks Whether to perform predictive service -# dependency checks in the Nagios configuration. Default is '1', which means -# predictive service dependency checks will be performed. You can set this to -# '0' to disable predictive service dependency checks. Predictive service -# dependency checks can help reduce false positives by checking the status of -# parent services before determining the status of child services. -# @param [String] ng_soft_state_dependencies Whether to use soft state -# dependencies in the Nagios configuration. Default is '0', which means soft -# state dependencies will not be used. You can set this to '1' to enable soft -# state dependencies if needed. Soft state dependencies allow Nagios to delay -# the propagation of host and service states based on the number of check -# attempts and the state of the checks, which can help reduce false positives -# during transient issues. -# @param [String] ng_time_change_threshold The time change threshold in the -# Nagios configuration. Default is '900', which means a time change of 900 -# seconds (15 minutes) or more will be considered significant and may trigger -# certain actions in Nagios. You can set this to a different number of seconds -# if needed to control how Nagios responds to significant time changes. -# @param [String] ng_auto_reschedule_checks Whether to automatically reschedule -# checks in the Nagios configuration. Default is '0', which means checks will -# not be automatically rescheduled. You can set this to '1' to enable automatic -# rescheduling of checks if needed. Automatic rescheduling can help ensure that -# checks are performed in a timely manner, especially after significant time -# changes or when the Nagios daemon is restarted. -# @param [String] ng_auto_reschedule_intval The interval for automatically -# rescheduling checks in the Nagios configuration. Default is '30', which means -# checks will be automatically rescheduled every 30 seconds if automatic -# rescheduling is enabled. You can set this to a different number of seconds if -# needed to control how often checks are automatically rescheduled. -# @param [String] ng_auto_reschedule_window The window for automatically -# rescheduling checks in the Nagios configuration. Default is '180', which -# means checks will be automatically rescheduled if they are within 180 seconds -# (3 minutes) of their scheduled check time when automatic rescheduling is enabled. -# You can set this to a different number of seconds if needed to control the window -# for automatic rescheduling of checks. -# @param [String] ng_service_check_timeout The timeout for service checks in the -# Nagios configuration. Default is '60', which means service checks will time -# out after 60 seconds. You can set this to a different number of seconds if -# needed to control how long Nagios will wait for a service check to complete -# before timing out. -# @param [String] ng_host_check_timeout The timeout for host checks in the -# Nagios configuration. Default is '30', which means host checks will time -# out after 30 seconds. You can set this to a different number of seconds if -# needed to control how long Nagios will wait for a host check to complete -# before timing out. -# @param [String] ng_event_handler_timeout The timeout for event handlers in the -# Nagios configuration. Default is '30', which means event handlers will time -# out after 30 seconds. You can set this to a different number of seconds if -# needed to control how long Nagios will wait for an event handler to complete -# before timing out. -# @param [String] ng_notification_timeout The timeout for notifications in the -# Nagios configuration. Default is '30', which means notifications will time -# out after 30 seconds. You can set this to a different number of seconds if -# needed to control how long Nagios will wait for a notification to be sent -# before timing out. -# @param [String] ng_ocsp_timeout The timeout for obsess over service checks -# in the Nagios configuration. Default is '5', which means obsess over service -# checks will time out after 5 seconds. You can set this to a different number -# of seconds if needed to control how long Nagios will wait for an obsess over -# service check to complete before timing out. -# @param [String] ng_perfdata_timeout The timeout for processing performance data -# in the Nagios configuration. Default is '5', which means processing of -# performance data will time out after 5 seconds. You can set this to a -# different number of seconds if needed to # control how long Nagios will -# wait for performance data processing to complete before timing out. -# @param [String] ng_retain_state_inf Whether to retain state information in the -# Nagios configuration. Default is '1', which means state information will be -# retained. You can set this to '0' to disable retention of state information if -# needed. Retaining state information allows Nagios to keep track of the current -# status of hosts and services, which can be useful for reporting and for making -# informed decisions about notifications and event handling. -# @param [String] ng_state_retention_file The path to the Nagios state retention -# file. Default is '/var/spool/nagios/retention.dat'. -# @param [String] ng_retention_update_intval The interval for updating the state -# retention file in the Nagios configuration. Default is '60', which means the -# state retention file will be updated every 60 seconds. You can set this to a -# different number of seconds if needed to control how often the state retention -# file is updated. -# @param [String] ng_use_ret_program_state Whether to use the retention program -# state in the Nagios configuration. Default is '1', which means the retention -# program state will be used. You can set this to '0' to disable the use of the -# retention program state if needed. The retention program state allows Nagios -# to retain the state of the Nagios daemon itself, which can be useful for -# determining if the daemon was restarted and for controlling how checks and -# notifications are handled after a restart. -# @param [String] ng_use_ret_scheduling_info Whether to use the retention -# scheduling information in the Nagios configuration. Default is '1', which -# means the retention scheduling information will be used. You can set this -# to '0' to disable the use of the retention scheduling information if needed. -# The retention scheduling information allows Nagios to retain information -# about the scheduled check times for hosts and services, which can help -# ensure that checks are performed at the correct times even after a restart. -# @param [String] ng_ret_host_attr_mask The retention host attribute mask in the -# Nagios configuration. Default is '0', which means no specific host attributes -# will be retained. You can set this to a specific value (e.g., '1') to control -# which host attributes are retained in the state retention file if needed. -# @param [String] ng_ret_service_attr_mask The retention service attribute -# mask in the Nagios configuration. Default is '0', which means no specific -# service attributes will be retained. You can set this to a specific value -# (e.g., '1') to control which service attributes are retained in the state -# retention file if needed. -# @param [String] ng_ret_proc_host_attr_mask The retention processed host -# attribute mask in the Nagios configuration. Default is '0', which means no -# specific processed host attributes will be retained. You can set this to a -# specific value (e.g., '1') to control which processed host attributes are -# retained in the state retention file if needed. -# @param [String] ng_ret_proc_svc_attr_mask The retention processed service -# attribute mask in the Nagios configuration. Default is '0', which means no -# specific processed service attributes will be retained. You can set this to a -# specific value (e.g., '1') to control which processed service attributes are -# retained in the state retention file if needed. -# @param [String] ng_ret_contact_h_attr_mask The retention contact host -# attribute mask in the Nagios configuration. Default is '0', which means no -# specific contact host attributes will be retained. You can set this to a -# specific value (e.g., '1') to control which contact host attributes are -# retained in the state retention file if needed. -# @param [String] ng_ret_contact_s_attr_mask The retention contact service -# attribute mask in the Nagios configuration. Default is '0', which means no -# specific contact service attributes will be retained. You can set this to a -# specific value (e.g., '1') to control which contact service attributes are -# retained in the state retention file if needed. -# @param [String] ng_interval_length The length of the time intervals in the -# Nagios configuration. Default is '60', which means time intervals will be -# 60 seconds long. You can set this to a different number of seconds if needed -# to control the length of time intervals for scheduling checks and other -# time-based actions in Nagios. -# @param [String] ng_check_for_updates Whether to check for updates in the -# Nagios configuration. Default is '1', which means Nagios will check for -# updates to the Nagios configuration files. You can set this to '0' to disable -# checking for updates if needed. Checking for updates allows Nagios to detect -# changes to the configuration files and reload the configuration as needed to -# apply those changes. -# @param [String] ng_bare_update_check Whether to perform a bare update check in -# the Nagios configuration. Default is '0', which means a bare update check will -# not be performed. You can set this to '1' to enable bare update checks -# if needed. A bare update check allows Nagios to check for updates to the -# configuration files without performing a full check of the configuration, -# which can be useful in certain scenarios. -# @param [String] ng_use_aggr_host_checking Whether to use aggregate host -# checking in the Nagios configuration. Default is '0', which means aggregate -# host checking will not be used. You can set this to '1' to enable aggregate -# host checking if needed. Aggregate host checking allows Nagios to perform -# checks on groups of hosts and determine the status of the group based on the -# status of the individual hosts, which can be useful for monitoring clusters or -# other groups of related hosts. -# @param [String] ng_execute_service_checks Whether to execute service checks -# in the Nagios configuration. Default is '1', which means service checks will -# be executed. You can set this to '0' to disable execution of service checks -# if needed. -# @param [String] ng_execute_host_checks Whether to execute host checks in -# the Nagios configuration. Default is '1', which means host checks will -# be executed. You can set this to '0' to disable execution of host checks -# if needed. -# @param [String] ng_accept_pass_svc_checks Whether to accept passive service -# checks in the Nagios configuration. Default is '1', which means passive -# service checks will be accepted. You can set this to '0' to disable -# acceptance of passive service checks if needed. -# @param [String] ng_accept_pass_host_checks Whether to accept passive host -# checks in the Nagios configuration. Default is '1', which means passive -# host checks will be accepted. You can set this to '0' to disable acceptance -# of passive host checks if needed. -# @param [String] ng_enable_notifications Whether to enable notifications in -# the Nagios configuration. Default is '1', which means notifications will be -# enabled. You can set this to '0' to disable notifications if needed. -# @param [String] ng_enable_event_handlers Whether to enable event handlers in -# the Nagios configuration. Default is '1', which means event handlers will be -# enabled. You can set this to '0' to disable event handlers if needed. -# @param [String] ng_process_perf_data Whether to process performance data in -# the Nagios configuration. Default is '1', which means performance data will -# be processed. You can set this to '0' to disable processing of performance -# data if needed. -# @param [String] ng_host_perfdata_command The command to process host -# performance data in the Nagios configuration. Default is '', which means no -# specific command will be configured for processing host performance data. -# You can set this to a specific command if needed. -# @param [String] ng_svc_perfdata_command The command to process service -# performance data in the Nagios configuration. Default is '', which means no -# specific command will be configured for processing service performance data. -# You can set this to a specific command if needed. -# @param [String] ng_host_perfdata_file The file to which host performance data -# will be written in the Nagios configuration. Default is '', which means no -# specific file will be configured for host performance data. You can set this -# to a specific file path if needed. -# @param [String] ng_service_perfdata_file -# The file to which service performance data will be written in the Nagios -# configuration. Default is '', which means no specific file will be -# configured for service performance data. You can set this to a specific -# file path if needed. -# @param [String] ng_host_perfdata_template The template for host performance -# data in the Nagios configuration. Default is '', which means no specific -# template will be configured for host performance data. You can set this to -# a specific template if needed. -# @param [String] ng_svc_perfdata_template The template for service performance -# data in the Nagios configuration. Default is '', which means no specific -# template will be configured for service performance data. You can set this -# to a specific template if needed. -# @param [String] ng_host_perfdata_file_mode The file mode for host performance -# data files in the Nagios configuration. -# @param [String] ng_svc_perfdata_file_mode The file mode for service performance -# data files in the Nagios configuration. -# @param [String] ng_h_perfdata_proc_intval The interval for processing host -# performance data in the Nagios configuration. Default is '0', which means -# host performance data will be processed immediately. You can set this to a -# specific number of seconds if needed to control how often host performance -# data is processed. -# @param [String] ng_s_perfdata_proc_intval The interval for processing service -# performance data in the Nagios configuration. Default is '0', which means -# service performance data will be processed immediately. You can set this to -# a specific number of seconds if needed to control how often service performance -# data is processed. -# @param [String] ng_s_perfdata_proc_cmd The command to process service -# performance data in the Nagios configuration. -# @param [String] ng_h_perfdata_proc_cmd The command to process host -# performance data in the Nagios configuration. -# @param [String] ng_obsess_over_services Whether to obsess over services in -# the Nagios configuration. Default is '0', which means not to obsess over -# services. You can set this to '1' to enable obsessing over services if -# needed. -# @param [String] ng_ocsp_command The command to process obsessive service -# checks in the Nagios configuration. Default is '', which means no specific -# command will be configured for obsessive service checks. You can set this -# to a specific command if needed. -# @param [String] ng_obsess_over_hosts Whether to obsess over hosts in the -# Nagios configuration. Default is '0', which means not to obsess over hosts. -# You can set this to '1' to enable obsessing over hosts if needed. -# @param [String] ng_ochp_command The command to process obsessive host checks -# in the Nagios configuration. Default is '', which means no specific command -# will be configured for obsessive host checks. You can set this to a specific -# command if needed. -# @param [String] ng_h_perfdata_proc_e_res The expected result for host performance -# data processing in the Nagios configuration. -# @param [String] ng_s_perfdata_proc_e_res The expected result for service -# performance data processing in the Nagios configuration -# @param [String] ng_translate_pass_h_checks Whether to translate passive -# host checks in the Nagios configuration. Default is '0', which means passive -# host checks will not be translated. You can set this to '1' to enable -# translation of passive host checks if needed. Translating passive host checks -# allows Nagios to convert passive host check results into active check results, -# which can be useful for certain monitoring scenarios. -# @param [String] ng_pass_h_checks_are_soft Whether to treat passive host checks -# as soft checks in the Nagios configuration. Default is '0', which means -# passive host checks will not be treated as soft checks. - ############################################################################### class confdroid_nagios::params ( @@ -442,140 +48,6 @@ class confdroid_nagios::params ( String $ng_u_home = '/home/nagios', Integer $ng_u_uid = 1004, -# nagios_cfg settings - String $ng_log_file = '/var/log/nagios/nagios.log', - String $ng_max_check_attempts = '10', - String $ng_object_cache_file = '/var/spool/nagios/objects.cache', - String $ng_precached_obj_file = '/var/spool/nagios/objects.precache', - String $ng_resource_file = '/etc/nagios/private/resource.cfg', - String $ng_status_file = '/var/log/nagios/status.dat', - String $ng_status_upd_interval = '10', - String $ng_check_ext_commands = '1', - String $ng_command_file = '/var/spool/nagios/cmd/nagios.cmd', - Boolean $ng_enable_query_handler = false, - String $ng_query_socket = '/var/spool/nagios/cmd/nagios.qh', - String $ng_lock_file = '/var/run/nagios/nagios.pid', - String $ng_temp_file = '/var/spool/nagios/nagios.tmp', - String $ng_temp_path = '/tmp', - String $ng_event_broker_options = '-1', - String $ng_event_broker_module = '', - String $ng_log_rotation_method = 'h', - String $ng_log_archive_path = '/var/log/nagios/archives', - String $ng_use_syslog = '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', - String $ng_glob_host_evt_handler = '', - String $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', - String $ng_check_result_path = '/var/spool/nagios/checkresults', - String $ng_max_check_res_file_age = '3600', - String $ng_cached_h_check_horizon = '15', - String $ng_cached_s_check_horizon = '15', - String $ng_pred_host_dep_checks = '1', - String $ng_pred_svc_dep_checks = '1', - String $ng_soft_state_dependencies = '0', - String $ng_time_change_threshold = '900', - String $ng_auto_reschedule_checks = '0', - String $ng_auto_reschedule_intval = '30', - String $ng_auto_reschedule_window = '180', - String $ng_service_check_timeout = '60', - String $ng_host_check_timeout = '30', - String $ng_event_handler_timeout = '30', - String $ng_notification_timeout = '30', - String $ng_ocsp_timeout = '5', - String $ng_perfdata_timeout = '5', - String $ng_retain_state_inf = '1', - String $ng_state_retention_file = '/var/spool/nagios/retention.dat', - String $ng_retention_update_intval = '60', - String $ng_use_ret_program_state = '1', - String $ng_use_ret_scheduling_info = '1', - String $ng_ret_host_attr_mask = '0', - String $ng_ret_service_attr_mask = '0', - String $ng_ret_proc_host_attr_mask = '0', - String $ng_ret_proc_svc_attr_mask = '0', - String $ng_ret_contact_h_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 = '0', - 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_file = '/var/spool/nagios/host-perfdata', - String $ng_service_perfdata_file = '/var/spool/nagios/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$SERVICELATENCY$\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-file', - String $ng_s_perfdata_proc_cmd = 'process-service-perfdata-file', - String $ng_h_perfdata_proc_e_res = '1', - String $ng_s_perfdata_proc_e_res = '1', - String $ng_obsess_over_services = '0', - String $ng_ocsp_command = '', - String $ng_obsess_over_hosts = '0', - String $ng_ochp_command = '', - 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 = '0', - 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', - String $ng_date_format = 'us', - Boolean $ng_use_timezone_offset = false, - String $ng_use_timezone = '', - String $ng_illegal_obj_name_chars = '`~!$%^&*|\'"<>?,()=', - String $ng_ill_macro_output_chars = '`~$&|\'"<>', - String $ng_use_regexp_matching = '0', - String $ng_true_regexp_matching = '0', - String $ng_daemon_dumps_core = '0', - String $ng_use_large_inst_tweaks = '0', - String $ng_enable_env_macros = '0', - String $ng_free_child_process_mem = '1', - String $ng_child_proc_fork_twice = '1', - String $ng_debug_level = '0', - String $ng_debug_verbosity = '1', - String $ng_debug_file = '/var/spool/nagios/nagios.debug', - String $ng_max_debug_file_size = '1000000', - String $ng_allow_empty_hostgroups = '0', - String $ng_check_workers = '', - String $ng_host_down_svc_checks = '0', - Boolean $ng_enable_load_ctl_options = false, - String $ng_loadctl_options = 'jobs_max=100;backoff_limit=10;rampup_change=5', - String $ng_mail_user = 'admin@example.net', - String $ng_page_user = 'pageadmin@example.net', - # httpd Boolean $ng_use_https = false, diff --git a/manifests/server/files.pp b/manifests/server/files.pp index 95faf25..469b095 100644 --- a/manifests/server/files.pp +++ b/manifests/server/files.pp @@ -7,14 +7,14 @@ class confdroid_nagios::server::files ( ) inherits confdroid_nagios::params { require confdroid_nagios::main::dirs - if $ng_nagios_server == $fqdn { - file { $ng_nagios_cfg_file: - ensure => file, - owner => $ng_user, - group => $ng_user, - mode => '0644', - content => template($ng_nagios_cfg_erb), - notify => Service[$ng_nagios_service], - } - } +# if $ng_nagios_server == $fqdn { +# file { $ng_nagios_cfg_file: +# ensure => file, +# owner => $ng_user, +# group => $ng_user, +# mode => '0644', +# content => template($ng_nagios_cfg_erb), +# notify => Service[$ng_nagios_service], +# } +# } } diff --git a/manifests/server/service.pp b/manifests/server/service.pp index e2c65f0..d9c6dbf 100644 --- a/manifests/server/service.pp +++ b/manifests/server/service.pp @@ -7,13 +7,13 @@ class confdroid_nagios::server::service ( ) inherits confdroid_nagios::params { require confdroid_nagios::server::files - if $ng_nagios_server == $fqdn { - service { $ng_nagios_service: - ensure => running, - name => $ng_nagios_service, - enable => true, - hasrestart => true, - hasstatus => true, - } - } +# if $ng_nagios_server == $fqdn { +# service { $ng_nagios_service: +# ensure => running, +# name => $ng_nagios_service, +# enable => true, +# hasrestart => true, +# hasstatus => true, +# } +# } }