aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--debian/changelog3
-rw-r--r--nagios-template-contacts.cfg17
-rw-r--r--nagios-templates.cfg18
-rw-r--r--nagios.cfg1
5 files changed, 23 insertions, 18 deletions
diff --git a/Makefile b/Makefile
index 9d36eef..217d9dd 100644
--- a/Makefile
+++ b/Makefile
@@ -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
diff --git a/nagios.cfg b/nagios.cfg
index 1038c99..7886afc 100644
--- a/nagios.cfg
+++ b/nagios.cfg
@@ -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