nagios4/debian/patches/52_nagios.cfg-debianize.patch
2017-05-19 22:22:41 +02:00

147 lines
4.0 KiB
Diff

Author: Alexander Wirt <formorer@debian.org>
Description: Debianize nagios.cfg
--- a/sample-config/nagios.cfg.in
+++ b/sample-config/nagios.cfg.in
@@ -2,10 +2,6 @@
#
# NAGIOS.CFG - Sample Main Config File for Nagios @VERSION@
#
-# Read the documentation for more information on this configuration
-# file. I've provided some comments here, but things may not be so
-# clear without further explanation.
-#
# Last Modified: 12-14-2008
#
##############################################################################
@@ -16,9 +12,19 @@
# for historical purposes. This should be the first option specified
# in the config file!!!
-log_file=@localstatedir@/nagios.log
+log_file=/var/log/nagios3/nagios.log
+# Commands definitions
+cfg_file=/etc/nagios3/commands.cfg
+# Debian also defaults to using the check commands defined by the debian
+# nagios-plugins package
+cfg_dir=/etc/nagios-plugins/config
+
+# Debian uses by default a configuration directory where nagios3-common,
+# other packages and the local admin can dump or link configuration
+# files into.
+cfg_dir=/etc/nagios3/conf.d
# OBJECT CONFIGURATION FILE(S)
# These are the object configuration files in which you define hosts,
@@ -27,13 +33,10 @@
# 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
@@ -64,7 +67,7 @@
# directly) in order to prevent inconsistencies that can occur
# when the config files are modified after Nagios starts.
-object_cache_file=@localstatedir@/objects.cache
+object_cache_file=/var/cache/nagios3/objects.cache
@@ -103,7 +106,7 @@
# The contents of the status file are deleted every time Nagios
# restarts.
-status_file=@localstatedir@/status.dat
+status_file=/var/cache/nagios3/status.dat
@@ -140,7 +143,7 @@
# you will have to enable this.
# Values: 0 = disable commands, 1 = enable commands
-check_external_commands=1
+check_external_commands=0
@@ -169,6 +172,8 @@
# 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.
+# Debian Users: In case you didn't read README.Debian yet, _NOW_ is the
+# time to do it.
command_file=@localstatedir@/rw/nagios.cmd
@@ -198,7 +203,7 @@
# is created, used, and deleted throughout the time that Nagios is
# running.
-temp_file=@localstatedir@/nagios.tmp
+temp_file=/var/cache/nagios3/nagios.tmp
@@ -264,7 +269,7 @@
# This is the directory where archived (rotated) log files should be
# placed (assuming you've chosen to do log rotation).
-log_archive_path=@localstatedir@/archives
+log_archive_path=/var/log/nagios3/archives
@@ -1112,7 +1117,7 @@
# strict-iso8601 (YYYY-MM-DDTHH:MM:SS)
#
-date_format=us
+date_format=iso8601
@@ -1142,7 +1147,7 @@
# embedded Perl interpreter) is located. If you didn't compile
# Nagios with embedded Perl support, this option has no effect.
-p1_file=@bindir@/p1.pl
+p1_file=/usr/lib/nagios3/p1.pl
@@ -1226,8 +1231,8 @@
# 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
@@ -1334,7 +1339,7 @@
# DEBUG FILE
# This option determines where Nagios should write debugging information.
-debug_file=@localstatedir@/nagios.debug
+debug_file=/var/log/nagios3/nagios.debug