OP#436 check for nagios works

This commit is contained in:
2026-03-06 15:09:06 +01:00
parent d5b266adda
commit 5674971148
2 changed files with 13 additions and 105 deletions

View File

@@ -123,6 +123,7 @@ class confdroid_nagios::params (
Boolean $ng_enable_target = true, Boolean $ng_enable_target = true,
Boolean $ng_purge_target = true, Boolean $ng_purge_target = true,
# contact groups # contact groups
String $ng_contactgroup_name = 'admins', String $ng_contactgroup_name = 'admins',
String $ng_contactgroup_alias = 'Nagios Administrators', String $ng_contactgroup_alias = 'Nagios Administrators',
@@ -254,7 +255,8 @@ class confdroid_nagios::params (
$ng_resource_erb = 'confdroid_nagios/nagios/resource_cfg.erb' $ng_resource_erb = 'confdroid_nagios/nagios/resource_cfg.erb'
$ng_object_cache_file = "${ng_spool_dir}/objects.cache" $ng_object_cache_file = "${ng_spool_dir}/objects.cache"
$ng_precached_obj_file = "${ng_spool_dir}/objects.precache" $ng_precached_obj_file = "${ng_spool_dir}/objects.precache"
$ng_status_file = "${ng_log_dir}/status.dat" $ng_status_file = "${ng_spool_dir}/status.dat"
$ng_command_file = "${ng_cmd_dir}/nagios.cmd"
## old ## old
$ng_taccgi_erb = 'confdroid_nagios/selinux/taccgi.erb' $ng_taccgi_erb = 'confdroid_nagios/selinux/taccgi.erb'

View File

@@ -14,121 +14,27 @@ log_file=<%= @ng_log_file %>
# Original files are available at https://3for.me/hn6ca (membership area) # Original files are available at https://3for.me/hn6ca (membership area)
# or at nagios.org # or at nagios.org
# Definitions for monitoring a Windows machine
#cfg_file=/etc/nagios/objects/windows.cfg
# Definitions for monitoring a router/switch
#cfg_file=/etc/nagios/objects/switch.cfg
# Definitions for monitoring a network printer
#cfg_file=/etc/nagios/objects/printer.cfg
cfg_dir=<%= @ng_conf_d_dir %> cfg_dir=<%= @ng_conf_d_dir %>
object_cache_file=<%= @ng_object_cache_file %>
# OBJECT CACHE FILE precached_object_file=<%= @ng_precached_obj_file %>
# This option determines where object definitions are cached when
# Nagios starts/restarts. The CGIs read object definitions from
# this cache file (rather than looking at the object config files
# directly) in order to prevent inconsistencies that can occur
# when the config files are modified after Nagios starts.
object_cache_file=/var/spool/nagios/objects.cache resource_file=<%= @ng_resource_file %>
status_file=<%= @$ng_status_file %>
status_update_interval=<%= @ng_status_upd_interval %>
# PRE-CACHED OBJECT FILE nagios_user=<%= @ng_user %>
# This options determines the location of the precached object file.
# If you run Nagios with the -p command line option, it will preprocess
# your object configuration file(s) and write the cached config to this
# file. You can then start Nagios with the -u option to have it read
# object definitions from this precached file, rather than the standard
# object configuration files (see the cfg_file and cfg_dir options above).
# Using a precached object file can speed up the time needed to (re)start
# the Nagios process if you've got a large and/or complex configuration.
# Read the documentation section on optimizing Nagios to find our more
# about how this feature works.
precached_object_file=/var/spool/nagios/objects.precache nagios_group=<%= @ng_user %>
check_external_commands=<%= @ng_check_ext_commands %>
command_file=<%= @ng_command_file %>
# RESOURCE FILE query_socket=<%= @ng_cmd_dir %>/nagios.qh
# This is an optional resource file that contains $USERx$ macro
# definitions. Multiple resource files can be specified by using
# multiple resource_file definitions. The CGIs will not attempt to
# read the contents of resource files, so information that is
# considered to be sensitive (usernames, passwords, etc) can be
# defined as macros in this file and restrictive permissions (600)
# can be placed on this file.
resource_file=/etc/nagios/private/resource.cfg
# STATUS FILE
# This is where the current status of all monitored services and
# hosts is stored. Its contents are read and processed by the CGIs.
# The contents of the status file are deleted every time Nagios
# restarts.
status_file=/var/spool/nagios/status.dat
# STATUS FILE UPDATE INTERVAL
# This option determines the frequency (in seconds) that
# Nagios will periodically dump program, host, and
# service status data.
status_update_interval=10
# NAGIOS USER
# This determines the effective user that Nagios should run as.
# You can either supply a username or a UID.
nagios_user=nagios
# NAGIOS GROUP
# This determines the effective group that Nagios should run as.
# You can either supply a group name or a GID.
nagios_group=nagios
# EXTERNAL COMMAND OPTION
# This option allows you to specify whether or not Nagios should check
# for external commands (in the command file defined below).
# By default Nagios will check for external commands.
# If you want to be able to use the CGI command interface
# you will have to enable this.
# Values: 0 = disable commands, 1 = enable commands
check_external_commands=1
# EXTERNAL COMMAND FILE
# This is the 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 (usually 'nobody'). Permissions should be set at the
# directory level instead of on the file, as the file is deleted every
# time its contents are processed.
command_file=/var/spool/nagios/cmd/nagios.cmd
# QUERY HANDLER INTERFACE
# This is the socket that is created for the Query Handler interface
#query_socket=/var/spool/nagios/cmd/nagios.qh