diff options
author | Petter Reinholdtsen <pere@hungry.com> | 2010-01-18 12:04:46 +0000 |
---|---|---|
committer | Petter Reinholdtsen <pere@hungry.com> | 2010-01-18 12:04:46 +0000 |
commit | b9d68afea4c00f5379b7285423bdc9eddf254092 (patch) | |
tree | 154c3a17f3e09fc26598d4bcd33cabd97acc4f35 | |
parent | ebd1ff2342f4ca7642820880ffbd081ec142b419 (diff) | |
download | sitesummary-b9d68afea4c00f5379b7285423bdc9eddf254092.tar.gz sitesummary-b9d68afea4c00f5379b7285423bdc9eddf254092.tar.bz2 sitesummary-b9d68afea4c00f5379b7285423bdc9eddf254092.tar.xz |
Move nagios contact information to separate file, to avoid
conffile questions during upgrades if the contacts are changed and
only the commands change.
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | debian/changelog | 3 | ||||
-rw-r--r-- | nagios-template-contacts.cfg | 17 | ||||
-rw-r--r-- | nagios-templates.cfg | 18 | ||||
-rw-r--r-- | nagios.cfg | 1 |
5 files changed, 23 insertions, 18 deletions
@@ -62,6 +62,8 @@ install-server: $(DESTDIR)/etc/nagios3/sitesummary.cfg $(INSTALL_DATA) nagios-templates.cfg \ $(DESTDIR)/etc/nagios3/sitesummary-templates.cfg + $(INSTALL_DATA) nagios-template-contacts.cfg \ + $(DESTDIR)/etc/nagios3/sitesummary-template-contacts.cfg $(INSTALL) -d $(DESTDIR)/etc/nagios $(INSTALL_DATA) nagios-nrpe-commands.cfg \ $(DESTDIR)/etc/nagios/sitesummary-nrpe-commands.cfg diff --git a/debian/changelog b/debian/changelog index d8f9c1c..11b82cf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,9 @@ sitesummary (0.0.55) UNRELEASED; urgency=low clients. * Make sure a Nagios ping check is generated for each hosts default route. * Check ftp from Nagios if proftpd is installed. + * Move nagios contact information to separate file, to avoid + conffile questions during upgrades if the contacts are changed and + only the commands change. -- Petter Reinholdtsen <pere@debian.org> Sat, 16 Jan 2010 21:06:29 +0100 diff --git a/nagios-template-contacts.cfg b/nagios-template-contacts.cfg new file mode 100644 index 0000000..e4924c9 --- /dev/null +++ b/nagios-template-contacts.cfg @@ -0,0 +1,17 @@ +define contact { + contact_name root + alias Root + host_notification_period 24x7 + service_notification_period 24x7 + host_notification_options d,r + service_notification_options w,u,c,r + host_notification_commands notify-by-nothing + service_notification_commands notify-by-nothing + email root@postoffice +} + +define contactgroup{ + contactgroup_name admins + alias Nagios Administrators + members root +} diff --git a/nagios-templates.cfg b/nagios-templates.cfg index 9b62f47..f5826d3 100644 --- a/nagios-templates.cfg +++ b/nagios-templates.cfg @@ -20,24 +20,6 @@ define command{ command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nState: $SERVICESTATE$ for $SERVICEDURATION$\nAddress: $HOSTADDRESS$\n\nInfo:\n\n$SERVICEOUTPUT$\n\nDate/Time: $LONGDATETIME$\n\nACK by: $SERVICEACKAUTHOR$\nComment: $SERVICEACKCOMMENT$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ alert $NOTIFICATIONNUMBER$ - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$ } -define contact { - contact_name root - alias Root - host_notification_period 24x7 - service_notification_period 24x7 - host_notification_options d,r - service_notification_options w,u,c,r - host_notification_commands notify-by-nothing - service_notification_commands notify-by-nothing - email root@postoffice -} - -define contactgroup{ - contactgroup_name admins - alias Nagios Administrators - members root -} - define host { name server-host check_command check-host-alive @@ -2,6 +2,7 @@ # host and service list. cfg_file=/etc/nagios3/sitesummary-templates.cfg +cfg_file=/etc/nagios3/sitesummary-template-contacts.cfg cfg_file=/var/lib/sitesummary/nagios-generated.cfg log_file=/var/log/nagios3/nagios.log temp_file=/var/cache/nagios3/nagios.tmp |