2014-10-05 11:53:19 +02:00
|
|
|
Author: Alexander Wirt <formorer@debian.org>
|
|
|
|
Description: Debianize nagios.cfg
|
2019-08-06 16:12:26 +02:00
|
|
|
Index: nagios4/sample-config/nagios.cfg.in
|
|
|
|
===================================================================
|
|
|
|
--- nagios4.orig/sample-config/nagios.cfg.in
|
|
|
|
+++ nagios4/sample-config/nagios.cfg.in
|
2017-05-20 00:28:01 +02:00
|
|
|
@@ -15,9 +15,19 @@
|
2019-08-06 16:12:26 +02:00
|
|
|
# for historical purposes. This should be the first option specified
|
2014-10-05 11:53:19 +02:00
|
|
|
# in the config file!!!
|
|
|
|
|
|
|
|
-log_file=@localstatedir@/nagios.log
|
2017-05-20 00:00:42 +02:00
|
|
|
+log_file=/var/log/nagios4/nagios.log
|
2014-10-05 11:53:19 +02:00
|
|
|
|
|
|
|
+# Commands definitions
|
2017-05-20 00:00:42 +02:00
|
|
|
+cfg_file=/etc/nagios4/commands.cfg
|
2014-10-05 11:53:19 +02:00
|
|
|
|
|
|
|
+# Debian also defaults to using the check commands defined by the debian
|
|
|
|
+# nagios-plugins package
|
|
|
|
+cfg_dir=/etc/nagios-plugins/config
|
|
|
|
+
|
2017-05-20 00:00:42 +02:00
|
|
|
+# Debian uses by default a configuration directory where nagios4-common,
|
2014-10-05 11:53:19 +02:00
|
|
|
+# other packages and the local admin can dump or link configuration
|
|
|
|
+# files into.
|
2017-05-20 00:00:42 +02:00
|
|
|
+cfg_dir=/etc/nagios4/conf.d
|
2014-10-05 11:53:19 +02:00
|
|
|
|
|
|
|
# OBJECT CONFIGURATION FILE(S)
|
|
|
|
# These are the object configuration files in which you define hosts,
|
2019-08-06 16:12:26 +02:00
|
|
|
@@ -26,13 +36,10 @@ log_file=@localstatedir@/nagios.log
|
2014-10-05 11:53:19 +02:00
|
|
|
# if you wish (as shown below), or keep them all in a single config file.
|
|
|
|
|
|
|
|
# You can specify individual object config files as shown below:
|
|
|
|
-cfg_file=@sysconfdir@/objects/commands.cfg
|
|
|
|
-cfg_file=@sysconfdir@/objects/contacts.cfg
|
|
|
|
-cfg_file=@sysconfdir@/objects/timeperiods.cfg
|
|
|
|
-cfg_file=@sysconfdir@/objects/templates.cfg
|
|
|
|
-
|
|
|
|
-# Definitions for monitoring the local (Linux) host
|
|
|
|
-cfg_file=@sysconfdir@/objects/localhost.cfg
|
|
|
|
+#cfg_file=@sysconfdir@/objects/commands.cfg
|
|
|
|
+#cfg_file=@sysconfdir@/objects/contacts.cfg
|
|
|
|
+#cfg_file=@sysconfdir@/objects/timeperiods.cfg
|
|
|
|
+#cfg_file=@sysconfdir@/objects/templates.cfg
|
|
|
|
|
|
|
|
# Definitions for monitoring a Windows machine
|
|
|
|
#cfg_file=@sysconfdir@/objects/windows.cfg
|
2019-08-06 16:12:26 +02:00
|
|
|
@@ -63,7 +70,7 @@ cfg_file=@sysconfdir@/objects/localhost.
|
2014-10-05 11:53:19 +02:00
|
|
|
# directly) in order to prevent inconsistencies that can occur
|
|
|
|
# when the config files are modified after Nagios starts.
|
|
|
|
|
|
|
|
-object_cache_file=@localstatedir@/objects.cache
|
2017-05-20 00:00:42 +02:00
|
|
|
+object_cache_file=/var/cache/nagios4/objects.cache
|
2014-10-05 11:53:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2019-08-06 16:12:26 +02:00
|
|
|
@@ -102,7 +109,7 @@ resource_file=@sysconfdir@/resource.cfg
|
2014-10-05 11:53:19 +02:00
|
|
|
# The contents of the status file are deleted every time Nagios
|
|
|
|
# restarts.
|
|
|
|
|
|
|
|
-status_file=@localstatedir@/status.dat
|
2017-05-20 00:00:42 +02:00
|
|
|
+status_file=/var/cache/nagios4/status.dat
|
2014-10-05 11:53:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2019-08-06 16:12:26 +02:00
|
|
|
@@ -139,7 +146,7 @@ nagios_group=@nagios_grp@
|
2014-10-05 11:53:19 +02:00
|
|
|
# you will have to enable this.
|
|
|
|
# Values: 0 = disable commands, 1 = enable commands
|
|
|
|
|
|
|
|
-check_external_commands=1
|
|
|
|
+check_external_commands=0
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-08-06 16:12:26 +02:00
|
|
|
@@ -150,6 +157,8 @@ check_external_commands=1
|
|
|
|
# is running as (usually 'nobody'). Permissions should be set at the
|
2014-10-05 11:53:19 +02:00
|
|
|
# directory level instead of on the file, as the file is deleted every
|
|
|
|
# time its contents are processed.
|
|
|
|
+# Debian Users: In case you didn't read README.Debian yet, _NOW_ is the
|
|
|
|
+# time to do it.
|
|
|
|
|
|
|
|
command_file=@localstatedir@/rw/nagios.cmd
|
|
|
|
|
2019-08-06 16:12:26 +02:00
|
|
|
@@ -176,7 +185,7 @@ lock_file=@subsyslockfile@
|
2014-10-05 11:53:19 +02:00
|
|
|
# is created, used, and deleted throughout the time that Nagios is
|
|
|
|
# running.
|
|
|
|
|
|
|
|
-temp_file=@localstatedir@/nagios.tmp
|
2017-05-20 00:00:42 +02:00
|
|
|
+temp_file=/var/cache/nagios4/nagios.tmp
|
2014-10-05 11:53:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2019-08-06 16:12:26 +02:00
|
|
|
@@ -243,7 +252,7 @@ log_rotation_method=d
|
|
|
|
# This is the directory where archived (rotated) log files should be
|
2014-10-05 11:53:19 +02:00
|
|
|
# placed (assuming you've chosen to do log rotation).
|
|
|
|
|
|
|
|
-log_archive_path=@localstatedir@/archives
|
2017-05-20 00:00:42 +02:00
|
|
|
+log_archive_path=/var/log/nagios4/archives
|
2014-10-05 11:53:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2019-08-06 16:12:26 +02:00
|
|
|
@@ -1093,7 +1102,7 @@ high_host_flap_threshold=20.0
|
2014-10-05 11:53:19 +02:00
|
|
|
# strict-iso8601 (YYYY-MM-DDTHH:MM:SS)
|
|
|
|
#
|
|
|
|
|
|
|
|
-date_format=us
|
|
|
|
+date_format=iso8601
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-08-06 16:12:26 +02:00
|
|
|
@@ -1178,8 +1187,8 @@ use_true_regexp_matching=0
|
2014-10-05 11:53:19 +02:00
|
|
|
# using the $ADMINEMAIL$ and $ADMINPAGER$ macros in your notification
|
|
|
|
# commands.
|
|
|
|
|
|
|
|
-admin_email=@nagios_user@@localhost
|
|
|
|
-admin_pager=page@nagios_user@@localhost
|
|
|
|
+admin_email=root@localhost
|
|
|
|
+admin_pager=pageroot@localhost
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-08-06 16:12:26 +02:00
|
|
|
@@ -1292,7 +1301,7 @@ debug_verbosity=1
|
2014-10-05 11:53:19 +02:00
|
|
|
# DEBUG FILE
|
|
|
|
# This option determines where Nagios should write debugging information.
|
|
|
|
|
|
|
|
-debug_file=@localstatedir@/nagios.debug
|
2017-05-20 00:00:42 +02:00
|
|
|
+debug_file=/var/log/nagios4/nagios.debug
|
2014-10-05 11:53:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
|