[Pkg-nagios-changes] [pkg-nagios] r1518 - in nagios3/trunk/debian: . patches
Alexander Wirt
formorer at alioth.debian.org
Sat Jul 12 09:55:13 UTC 2008
Author: formorer
Date: 2008-07-12 09:55:12 +0000 (Sat, 12 Jul 2008)
New Revision: 1518
Added:
nagios3/trunk/debian/patches/50_cgi.cfg-debianize.dpatch
nagios3/trunk/debian/patches/51_commands.cfg-debianize.dpatch
nagios3/trunk/debian/patches/52_nagios.cfg-debianize.dpatch
Modified:
nagios3/trunk/debian/patches/00list
nagios3/trunk/debian/rules
Log:
Add config patches and sed for cgi.cfg
Modified: nagios3/trunk/debian/patches/00list
===================================================================
--- nagios3/trunk/debian/patches/00list 2008-07-12 09:55:09 UTC (rev 1517)
+++ nagios3/trunk/debian/patches/00list 2008-07-12 09:55:12 UTC (rev 1518)
@@ -1,3 +1,6 @@
10_p1_pl_shebang.dpatch
20_submit_check_result_386152.dpatch
40_fix_spurious_dollar_signs_added_to_command_lines.dpatch
+50_cgi.cfg-debianize.dpatch
+51_commands.cfg-debianize.dpatch
+52_nagios.cfg-debianize.dpatch
Added: nagios3/trunk/debian/patches/50_cgi.cfg-debianize.dpatch
===================================================================
--- nagios3/trunk/debian/patches/50_cgi.cfg-debianize.dpatch (rev 0)
+++ nagios3/trunk/debian/patches/50_cgi.cfg-debianize.dpatch 2008-07-12 09:55:12 UTC (rev 1518)
@@ -0,0 +1,28 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## cfg.cfg-debianize.dpatch by Alexander Wirt <formorer at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+diff -urNad pkg-nagios3~/sample-config/cgi.cfg.in pkg-nagios3/sample-config/cgi.cfg.in
+--- pkg-nagios3~/sample-config/cgi.cfg.in 2007-10-07 21:42:52.000000000 +0200
++++ pkg-nagios3/sample-config/cgi.cfg.in 2008-07-12 08:34:25.000000000 +0200
+@@ -43,7 +43,7 @@
+ # Values: 0 = disables context-sensitive help
+ # 1 = enables context-sensitive help
+
+-show_context_help=0
++show_context_help=1
+
+
+
+@@ -55,7 +55,7 @@
+
+ use_pending_states=1
+
+-
++nagios_check_command=/usr/lib/nagios/plugins/check_nagios /var/cache/nagios3/status.dat 5 '/usr/sbin/nagios3'
+
+
+ # AUTHENTICATION USAGE
Property changes on: nagios3/trunk/debian/patches/50_cgi.cfg-debianize.dpatch
___________________________________________________________________
Name: svn:executable
+ *
Added: nagios3/trunk/debian/patches/51_commands.cfg-debianize.dpatch
===================================================================
--- nagios3/trunk/debian/patches/51_commands.cfg-debianize.dpatch (rev 0)
+++ nagios3/trunk/debian/patches/51_commands.cfg-debianize.dpatch 2008-07-12 09:55:12 UTC (rev 1518)
@@ -0,0 +1,224 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 51_commands.cfg-debianize.dpatch by Alexander Wirt <formorer at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+diff -urNad pkg-nagios3~/sample-config/template-object/commands.cfg.in pkg-nagios3/sample-config/template-object/commands.cfg.in
+--- pkg-nagios3~/sample-config/template-object/commands.cfg.in 2007-06-09 18:43:04.000000000 +0200
++++ pkg-nagios3/sample-config/template-object/commands.cfg.in 2008-07-12 08:40:10.000000000 +0200
+@@ -3,23 +3,12 @@
+ #
+ # Last Modified: 05-31-2007
+ #
+-# NOTES: This config file provides you with some example command definitions
+-# that you can reference in host, service, and contact definitions.
+-#
+-# You don't need to keep commands in a separate file from your other
+-# object definitions. This has been done just to make things easier to
+-# understand.
+-#
+ ###############################################################################
+
+
+ ################################################################################
+ #
+-# SAMPLE NOTIFICATION COMMANDS
+-#
+-# These are some example notification commands. They may or may not work on
+-# your system without modification. As an example, some systems will require
+-# you to use "/usr/bin/mailx" instead of "/usr/bin/mail" in the commands below.
++# NOTIFICATION COMMANDS
+ #
+ ################################################################################
+
+@@ -42,184 +31,16 @@
+
+ ################################################################################
+ #
+-# SAMPLE HOST CHECK COMMANDS
+-#
+-################################################################################
+-
+-
+-# This command checks to see if a host is "alive" by pinging it
+-# The check must result in a 100% packet loss or 5 second (5000ms) round trip
+-# average time to produce a critical error.
+-# Note: Five ICMP echo packets are sent (determined by the '-p 5' argument)
+-
+-# 'check-host-alive' command definition
+-define command{
+- command_name check-host-alive
+- command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5
+- }
+-
+-
+-
+-
+-################################################################################
+-#
+-# SAMPLE SERVICE CHECK COMMANDS
+-#
+-# These are some example service check commands. They may or may not work on
+-# your system, as they must be modified for your plugins. See the HTML
+-# documentation on the plugins for examples of how to configure command definitions.
++# HOST CHECK COMMANDS
+ #
+-# NOTE: The following 'check_local_...' functions are designed to monitor
+-# various metrics on the host that Nagios is running on (i.e. this one).
+ ################################################################################
+
+-# 'check_local_disk' command definition
+-define command{
+- command_name check_local_disk
+- command_line $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
+- }
+-
+-
+-# 'check_local_load' command definition
+-define command{
+- command_name check_local_load
+- command_line $USER1$/check_load -w $ARG1$ -c $ARG2$
+- }
+-
+-
+-# 'check_local_procs' command definition
+-define command{
+- command_name check_local_procs
+- command_line $USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
+- }
+-
+-
+-# 'check_local_users' command definition
+-define command{
+- command_name check_local_users
+- command_line $USER1$/check_users -w $ARG1$ -c $ARG2$
+- }
+-
+-
+-# 'check_local_swap' command definition
+-define command{
+- command_name check_local_swap
+- command_line $USER1$/check_swap -w $ARG1$ -c $ARG2$
+- }
+-
+-
+-# 'check_local_mrtgtraf' command definition
+-define command{
+- command_name check_local_mrtgtraf
+- command_line $USER1$/check_mrtgtraf -F $ARG1$ -a $ARG2$ -w $ARG3$ -c $ARG4$ -e $ARG5$
+- }
+-
+-
+-################################################################################
+-# NOTE: The following 'check_...' commands are used to monitor services on
+-# both local and remote hosts.
+-################################################################################
+-
+-# 'check_ftp' command definition
+-define command{
+- command_name check_ftp
+- command_line $USER1$/check_ftp -H $HOSTADDRESS$ $ARG1$
+- }
+-
+-
+-# 'check_hpjd' command definition
+-define command{
+- command_name check_hpjd
+- command_line $USER1$/check_hpjd -H $HOSTADDRESS$ $ARG1$
+- }
+-
+-
+-# 'check_snmp' command definition
+-define command{
+- command_name check_snmp
+- command_line $USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$
+- }
+-
+-
+-# 'check_http' command definition
+-define command{
+- command_name check_http
+- command_line $USER1$/check_http -I $HOSTADDRESS$ $ARG1$
+- }
+-
+-
+-# 'check_ssh' command definition
+-define command{
+- command_name check_ssh
+- command_line $USER1$/check_ssh $ARG1$ $HOSTADDRESS$
+- }
+-
+-
+-# 'check_dhcp' command definition
+-define command{
+- command_name check_dhcp
+- command_line $USER1$/check_dhcp $ARG1$
+- }
+-
+-
+-# 'check_ping' command definition
+-define command{
+- command_name check_ping
+- command_line $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5
+- }
+-
+-
+-# 'check_pop' command definition
+-define command{
+- command_name check_pop
+- command_line $USER1$/check_pop -H $HOSTADDRESS$ $ARG1$
+- }
+-
+-
+-# 'check_imap' command definition
+-define command{
+- command_name check_imap
+- command_line $USER1$/check_imap -H $HOSTADDRESS$ $ARG1$
+- }
+-
+-
+-# 'check_smtp' command definition
+-define command{
+- command_name check_smtp
+- command_line $USER1$/check_smtp -H $HOSTADDRESS$ $ARG1$
+- }
+-
+-
+-# 'check_tcp' command definition
+-define command{
+- command_name check_tcp
+- command_line $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$
+- }
+-
+-
+-# 'check_udp' command definition
+-define command{
+- command_name check_udp
+- command_line $USER1$/check_udp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$
+- }
+-
+-
+-# 'check_nt' command definition
+-define command{
+- command_name check_nt
+- command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v $ARG1$ $ARG2$
+- }
+-
+-
++# On Debian, check-host-alive is being defined from within the
++# nagios-plugins package
+
+ ################################################################################
+ #
+-# SAMPLE PERFORMANCE DATA COMMANDS
+-#
+-# These are sample performance data commands that can be used to send performance
+-# data output to two text files (one for hosts, another for services). If you
+-# plan on simply writing performance data out to a file, consider using the
+-# host_perfdata_file and service_perfdata_file options in the main config file.
++# PERFORMANCE DATA COMMANDS
+ #
+ ################################################################################
+
Property changes on: nagios3/trunk/debian/patches/51_commands.cfg-debianize.dpatch
___________________________________________________________________
Name: svn:executable
+ *
Added: nagios3/trunk/debian/patches/52_nagios.cfg-debianize.dpatch
===================================================================
--- nagios3/trunk/debian/patches/52_nagios.cfg-debianize.dpatch (rev 0)
+++ nagios3/trunk/debian/patches/52_nagios.cfg-debianize.dpatch 2008-07-12 09:55:12 UTC (rev 1518)
@@ -0,0 +1,148 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 52_nagios.cfg-debianize.dpatch by Alexander Wirt <formorer at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+diff -urNad pkg-nagios3~/sample-config/nagios.cfg.in pkg-nagios3/sample-config/nagios.cfg.in
+--- pkg-nagios3~/sample-config/nagios.cfg.in 2008-05-19 20:02:08.000000000 +0200
++++ pkg-nagios3/sample-config/nagios.cfg.in 2008-07-12 08:46:15.000000000 +0200
+@@ -1,11 +1,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: 05-19-2008
+ #
+ ##############################################################################
+@@ -16,8 +11,14 @@
+ # 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
+
+
+ # OBJECT CONFIGURATION FILE(S)
+@@ -27,13 +28,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 +62,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 +101,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 +138,7 @@
+ # you will have to enable this.
+ # Values: 0 = disable commands, 1 = enable commands
+
+-check_external_commands=1
++check_external_commands=0
+
+
+
+@@ -169,6 +167,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 +198,7 @@
+ # is created, used, and deleted throughout the time that Nagios is
+ # running.
+
+-temp_file=@localstatedir@/nagios.tmp
++temp_file=/var/cache/nagios.tmp
+
+
+
+@@ -264,7 +264,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
+
+
+
+@@ -1051,7 +1051,7 @@
+ # strict-iso8601 (YYYY-MM-DDTHH:MM:SS)
+ #
+
+-date_format=us
++date_format=iso8601
+
+
+
+@@ -1081,7 +1081,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
+
+
+
+@@ -1165,8 +1165,8 @@
+ # using the $ADMINEMAIL$ and $ADMINPAGER$ macros in your notification
+ # commands.
+
+-admin_email=@nagios_user@@localhost
+-admin_pager=page at nagios_user@@localhost
++admin_email=root at localhost
++admin_pager=pageroot at localhost
+
+
+
+@@ -1286,4 +1286,8 @@
+
+ max_debug_file_size=1000000
+
++# 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
+
Property changes on: nagios3/trunk/debian/patches/52_nagios.cfg-debianize.dpatch
___________________________________________________________________
Name: svn:executable
+ *
Modified: nagios3/trunk/debian/rules
===================================================================
--- nagios3/trunk/debian/rules 2008-07-12 09:55:09 UTC (rev 1517)
+++ nagios3/trunk/debian/rules 2008-07-12 09:55:12 UTC (rev 1518)
@@ -53,7 +53,7 @@
#-rm -Rf docs examples {build,config}-nagios-{text,pgsql,mysql}-stamp
if test -f Makefile; then make distclean; fi
#-rm -Rf {cgi,base}/*.{mysql,pgsql,text}
- rm -f patch-stamp install-stamp configure-stamp build-stamp
+ rm -f patch-stamp install-stamp configure-stamp build-stamp fix-configs-stamp
rm -rf debian-configs
#-rm debian/templates.merged subst
find -type d -name autom4te.cache -print0 | xargs -0 -r rm -rf \;
@@ -63,6 +63,12 @@
dh_clean
debconf-updatepo
+fix-configs: fix-configs-stamp
+ mkdir -p debian-configs
+ sed -e '/Sample CGI/ s/\([0-9]\.[0-9]\.[0-9]\)//' \
+ -e '/Last Modified/,+1 d' \
+ sample-config/cgi.cfg > debian-configs/cgi.cfg
+
configure: configure-stamp
configure-stamp:
dh_testdir -a
@@ -93,7 +99,7 @@
rm -rf patch-stamp debian/patched
install: install-stamp
-install-stamp: build-stamp unpack-configs-stamp
+install-stamp: build-stamp fix-configs-stamp
@echo "Doing $@"
dh_testdir -a
dh_testroot -a
More information about the Pkg-nagios-changes
mailing list