--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: sitesummary: Don't depend on nagios3 which has been removed from unstable
- From: Bas Couwenberg <sebastic@xs4all.nl>
- Date: Sat, 03 Dec 2016 20:55:27 +0100
- Message-id: <148079492790.32095.10758053872519216170.reportbug@osiris.linuxminded.xs4all.nl>
Source: sitesummary
Version: 0.1.26
Severity: normal
Tags: patch
User: pkg-nagios-devel@lists.alioth.debian.org
Usertags: nagios3-rm
Dear Maintainer,
Please update your package to deal with the nagios3 removal from Debian
(#845765).
Consider applying the attached patch.
Kind Regards,
Bas
diff -Nru sitesummary-0.1.26/debian/changelog sitesummary-0.1.26+nmu1/debian/changelog
--- sitesummary-0.1.26/debian/changelog 2016-11-27 14:36:37.000000000 +0100
+++ sitesummary-0.1.26+nmu1/debian/changelog 2016-12-03 20:44:06.000000000 +0100
@@ -1,3 +1,10 @@
+sitesummary (0.1.26+nmu1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Use Icinga instead of Nagios (nagios3 removed from Debian).
+
+ -- Bas Couwenberg <sebastic@debian.org> Sat, 03 Dec 2016 20:43:49 +0100
+
sitesummary (0.1.26) unstable; urgency=medium
[ Petter Reinholdtsen ]
diff -Nru sitesummary-0.1.26/debian/control sitesummary-0.1.26+nmu1/debian/control
--- sitesummary-0.1.26/debian/control 2016-11-27 13:20:00.000000000 +0100
+++ sitesummary-0.1.26+nmu1/debian/control 2016-12-03 20:19:57.000000000 +0100
@@ -19,7 +19,7 @@
Pre-Depends: ${misc:Pre-Depends}
Depends: ${misc:Depends}, ${perl:Depends}, gnupg, net-tools, libcgi-pm-perl
Recommends: apache2 | httpd, sitesummary-client
-Suggests: munin, munin-node, nagios3, nagios-plugins-standard, ldap-utils, cups-client
+Suggests: munin, munin-node, icinga, monitoring-plugins-standard, ldap-utils, cups-client
Description: Generate site summary of submitting hosts (server part)
The sitesummary system makes it easier to keep track of a lot of
machines, by allowing each machine to report their existence once a
@@ -33,7 +33,7 @@
Architecture: all
Depends: ${misc:Depends}, ${perl:Depends}, lsb-base (>= 3.0-6), gnupg
Recommends: cron, dmidecode, pciutils, usbutils, lsscsi, iproute2, hdparm
-Suggests: sitesummary, munin-node, nagios-nrpe-server, nagios-plugins-standard, cdpr
+Suggests: sitesummary, munin-node, nagios-nrpe-server, monitoring-plugins-standard, cdpr
Description: Generate site summary of submitting hosts (client part)
The sitesummary system makes it easier to keep track of a lot of
machines, by allowing each machine to report their existence once a
diff -Nru sitesummary-0.1.26/debian/sitesummary.install sitesummary-0.1.26+nmu1/debian/sitesummary.install
--- sitesummary-0.1.26/debian/sitesummary.install 2015-05-13 16:43:09.000000000 +0200
+++ sitesummary-0.1.26+nmu1/debian/sitesummary.install 2016-12-03 20:46:46.000000000 +0100
@@ -1,5 +1,5 @@
debian/tmp/etc/apache2
-debian/tmp/etc/nagios3
+debian/tmp/etc/icinga
debian/tmp/usr/lib/cgi-bin
debian/tmp/usr/lib/sitesummary/*-summary
debian/tmp/usr/lib/sitesummary/expire-entry
diff -Nru sitesummary-0.1.26/debian/sitesummary.postinst sitesummary-0.1.26+nmu1/debian/sitesummary.postinst
--- sitesummary-0.1.26/debian/sitesummary.postinst 2016-11-19 15:35:37.000000000 +0100
+++ sitesummary-0.1.26+nmu1/debian/sitesummary.postinst 2016-12-03 20:28:23.000000000 +0100
@@ -6,14 +6,14 @@
. /usr/share/debconf/confmodule
test_nagios() {
- if grep -q '^NAGIOSCFG="/etc/nagios3/sitesummary.cfg"$' "$config"; then
+ if grep -q '^NAGIOSCFG="/etc/icinga/sitesummary.cfg"$' "$config"; then
:
else
db_get sitesummary/enable-nagios-config
if [ true = "$RET" ] ; then
mkdir -p $(dirname $config)
- echo 'NAGIOSCFG="/etc/nagios3/sitesummary.cfg"' \
- >> /etc/default/nagios3
+ echo 'NAGIOSCFG="/etc/icinga/sitesummary.cfg"' \
+ >> /etc/default/icinga
if [ ! -f /var/lib/sitesummary/nagios-generated.cfg ] ; then
# Create dummy file to make sure nagios will start
# on first boot if sitesummary is installed using
@@ -53,7 +53,7 @@
fi
fi
- config=/etc/default/nagios3
+ config=/etc/default/icinga
if [ -f "$config" ] ; then
test_nagios
fi
diff -Nru sitesummary-0.1.26/Makefile sitesummary-0.1.26+nmu1/Makefile
--- sitesummary-0.1.26/Makefile 2015-05-13 16:43:09.000000000 +0200
+++ sitesummary-0.1.26+nmu1/Makefile 2016-12-03 20:30:35.000000000 +0100
@@ -62,13 +62,13 @@
$(INSTALL) munin-plugin-agesinceseen \
$(DESTDIR)/usr/share/munin/plugins/sitesummary_agesinceseen
- $(INSTALL) -d $(DESTDIR)/etc/nagios3
+ $(INSTALL) -d $(DESTDIR)/etc/icinga
$(INSTALL_DATA) nagios.cfg \
- $(DESTDIR)/etc/nagios3/sitesummary.cfg
+ $(DESTDIR)/etc/icinga/sitesummary.cfg
$(INSTALL_DATA) nagios-templates.cfg \
- $(DESTDIR)/etc/nagios3/sitesummary-templates.cfg
+ $(DESTDIR)/etc/icinga/sitesummary-templates.cfg
$(INSTALL_DATA) nagios-template-contacts.cfg \
- $(DESTDIR)/etc/nagios3/sitesummary-template-contacts.cfg
+ $(DESTDIR)/etc/icinga/sitesummary-template-contacts.cfg
$(INSTALL) -d $(DESTDIR)/etc/nagios
$(INSTALL_DATA) nagios-nrpe-commands.cfg \
$(DESTDIR)/etc/nagios/sitesummary-nrpe-commands.cfg
diff -Nru sitesummary-0.1.26/nagios.cfg sitesummary-0.1.26+nmu1/nagios.cfg
--- sitesummary-0.1.26/nagios.cfg 2015-05-13 16:43:09.000000000 +0200
+++ sitesummary-0.1.26+nmu1/nagios.cfg 2016-12-03 20:37:31.000000000 +0100
@@ -6,24 +6,24 @@
# for historical purposes. This should be the first option specified
# in the config file!!!
-log_file=/var/log/nagios3/nagios.log
+log_file=/var/log/icinga/icinga.log
-cfg_file=/etc/nagios3/sitesummary-templates.cfg
-cfg_file=/etc/nagios3/sitesummary-template-contacts.cfg
+cfg_file=/etc/icinga/sitesummary-templates.cfg
+cfg_file=/etc/icinga/sitesummary-template-contacts.cfg
cfg_file=/var/lib/sitesummary/nagios-generated.cfg
# Commands definitions
-#cfg_file=/etc/nagios3/commands.cfg
+#cfg_file=/etc/icinga/commands.cfg
# Debian also defaults to using the check commands defined by the debian
-# nagios-plugins package
-#cfg_dir=/etc/nagios-plugins/config
+# monitoring-plugins package
+#cfg_dir=/etc/monitoring-plugins/config
-# Debian uses by default a configuration directory where nagios3-common,
+# Debian uses by default a configuration directory where icinga-common,
# other packages and the local admin can dump or link configuration
# files into.
-#cfg_dir=/etc/nagios3/conf.d
+#cfg_dir=/etc/icinga/objects
# OBJECT CONFIGURATION FILE(S)
# These are the object configuration files in which you define hosts,
@@ -32,29 +32,29 @@
# 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=/etc/nagios3/objects/commands.cfg
-#cfg_file=/etc/nagios3/objects/contacts.cfg
-#cfg_file=/etc/nagios3/objects/timeperiods.cfg
-#cfg_file=/etc/nagios3/objects/templates.cfg
+#cfg_file=/etc/icinga/objects/commands.cfg
+#cfg_file=/etc/icinga/objects/contacts.cfg
+#cfg_file=/etc/icinga/objects/timeperiods.cfg
+#cfg_file=/etc/icinga/objects/templates.cfg
# Definitions for monitoring a Windows machine
-#cfg_file=/etc/nagios3/objects/windows.cfg
+#cfg_file=/etc/icinga/objects/windows.cfg
# Definitions for monitoring a router/switch
-#cfg_file=/etc/nagios3/objects/switch.cfg
+#cfg_file=/etc/icinga/objects/switch.cfg
# Definitions for monitoring a network printer
-#cfg_file=/etc/nagios3/objects/printer.cfg
+#cfg_file=/etc/icinga/objects/printer.cfg
# You can also tell Nagios to process all config files (with a .cfg
# extension) in a particular directory by using the cfg_dir
# directive as shown below:
-#cfg_dir=/etc/nagios3/servers
-#cfg_dir=/etc/nagios3/printers
-#cfg_dir=/etc/nagios3/switches
-#cfg_dir=/etc/nagios3/routers
+#cfg_dir=/etc/icinga/servers
+#cfg_dir=/etc/icinga/printers
+#cfg_dir=/etc/icinga/switches
+#cfg_dir=/etc/icinga/routers
@@ -66,7 +66,7 @@
# directly) in order to prevent inconsistencies that can occur
# when the config files are modified after Nagios starts.
-object_cache_file=/var/cache/nagios3/objects.cache
+object_cache_file=/var/cache/icinga/objects.cache
@@ -82,7 +82,7 @@
# Read the documentation section on optimizing Nagios to find our more
# about how this feature works.
-precached_object_file=/var/lib/nagios3/objects.precache
+precached_object_file=/var/lib/icinga/objects.precache
@@ -95,7 +95,7 @@
# defined as macros in this file and restrictive permissions (600)
# can be placed on this file.
-resource_file=/etc/nagios3/resource.cfg
+resource_file=/etc/icinga/resource.cfg
@@ -105,7 +105,7 @@
# The contents of the status file are deleted every time Nagios
# restarts.
-status_file=/var/cache/nagios3/status.dat
+status_file=/var/lib/icinga/status.dat
@@ -174,7 +174,7 @@
# Debian Users: In case you didn't read README.Debian yet, _NOW_ is the
# time to do it.
-command_file=/var/lib/nagios3/rw/nagios.cmd
+command_file=/var/lib/icinga/rw/icinga.cmd
@@ -192,7 +192,7 @@
# This is the lockfile that Nagios will use to store its PID number
# in when it is running in daemon mode.
-lock_file=/var/run/nagios3/nagios3.pid
+lock_file=/var/run/icinga/icinga.pid
@@ -202,7 +202,7 @@
# is created, used, and deleted throughout the time that Nagios is
# running.
-temp_file=/var/cache/nagios3/nagios.tmp
+temp_file=/var/cache/icinga/icinga.tmp
@@ -268,7 +268,7 @@
# This is the directory where archived (rotated) log files should be
# placed (assuming you've chosen to do log rotation).
-log_archive_path=/var/log/nagios3/archives
+log_archive_path=/var/log/icinga/archives
@@ -466,7 +466,7 @@
# Note: Make sure that only one instance of Nagios has access
# to this directory!
-check_result_path=/var/lib/nagios3/spool/checkresults
+check_result_path=/var/lib/icinga/spool/checkresults
@@ -641,7 +641,7 @@
# This file is used only if the preserve_state_information
# variable is set to 1.
-state_retention_file=/var/lib/nagios3/retention.dat
+state_retention_file=/var/cache/icinga/retention.dat
@@ -1093,7 +1093,7 @@
# embedded Perl interpreter) is located. If you didn't compile
# Nagios with embedded Perl support, this option has no effect.
-p1_file=/usr/lib/nagios3/p1.pl
+p1_file=/usr/lib/icinga/p1.pl
@@ -1285,7 +1285,7 @@
# DEBUG FILE
# This option determines where Nagios should write debugging information.
-debug_file=/var/lib/nagios3/nagios.debug
+debug_file=/var/log/icinga/icinga.debug
diff -Nru sitesummary-0.1.26/nagios-template-contacts.cfg sitesummary-0.1.26+nmu1/nagios-template-contacts.cfg
--- sitesummary-0.1.26/nagios-template-contacts.cfg 2015-05-13 16:43:09.000000000 +0200
+++ sitesummary-0.1.26+nmu1/nagios-template-contacts.cfg 2016-12-03 20:38:25.000000000 +0100
@@ -12,6 +12,6 @@
define contactgroup{
contactgroup_name admins
- alias Nagios Administrators
+ alias Icinga Administrators
members root
}
diff -Nru sitesummary-0.1.26/nagios-templates.cfg sitesummary-0.1.26+nmu1/nagios-templates.cfg
--- sitesummary-0.1.26/nagios-templates.cfg 2015-05-13 16:43:09.000000000 +0200
+++ sitesummary-0.1.26+nmu1/nagios-templates.cfg 2016-12-03 20:39:02.000000000 +0100
@@ -45,12 +45,12 @@
define command {
command_name host-notify-by-email
- command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTALIAS$\nState: $HOSTSTATE$ for $HOSTDURATION$\nAddress: $HOSTADDRESS$\nInfo:\n\n$HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n\nACK by: $HOSTACKAUTHOR$\nComment: $HOSTACKCOMMENT$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ alert $NOTIFICATIONNUMBER$ - $HOSTALIAS$ host is $HOSTSTATE$ **" $CONTACTEMAIL$
+ command_line /usr/bin/printf "%b" "***** Icinga *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTALIAS$\nState: $HOSTSTATE$ for $HOSTDURATION$\nAddress: $HOSTADDRESS$\nInfo:\n\n$HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n\nACK by: $HOSTACKAUTHOR$\nComment: $HOSTACKCOMMENT$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ alert $NOTIFICATIONNUMBER$ - $HOSTALIAS$ host is $HOSTSTATE$ **" $CONTACTEMAIL$
}
define command{
command_name notify-by-email
- 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$
+ command_line /usr/bin/printf "%b" "***** Icinga *****\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 host {
diff -Nru sitesummary-0.1.26/README sitesummary-0.1.26+nmu1/README
--- sitesummary-0.1.26/README 2015-05-13 16:43:09.000000000 +0200
+++ sitesummary-0.1.26+nmu1/README 2016-12-03 20:42:42.000000000 +0100
@@ -25,35 +25,35 @@
sitesummary sitesummary/replace-munin-config boolean true
-Sitesummary generated Nagios configuration
+Sitesummary generated Icinga configuration
------------------------------------------
-Since version 0.0.51, there is code in sitesummary to generate Nagios
+Since version 0.0.51, there is code in sitesummary to generate Icinga
configuration based on the collected information. To enable this,
-install nagios3 and nagios-plugins-standard, edit /etc/default/nagios3
-to include 'NAGIOSCFG=/etc/nagios3/sitesummary.cfg' and run the
+install icinga and monitoring-plugins-standard, edit /etc/default/icinga
+to include 'NAGIOSCFG=/etc/icinga/sitesummary.cfg' and run the
sitesummary cron job. Running these commands as root normally does
the trick.
- aptitude install nagios3 nagios-plugins-standard
- echo 'NAGIOSCFG="/etc/nagios3/sitesummary.cfg"' >> /etc/default/nagios3
+ aptitude install icinga monitoring-plugins-standard
+ echo 'NAGIOSCFG="/etc/icinga/sitesummary.cfg"' >> /etc/default/icinga
sitesummary-client
/etc/cron.daily/sitesummary
- /etc/init.d/nagios3 restart
+ service icinga restart
-The current version of the code run all Nagios checks locally, so it
+The current version of the code run all Icinga checks locally, so it
only work on a single machine. The plan is to change this to use NRPE
to work with a network of machines.
On the client side, add
'include=/etc/nagios/sitesummary-nrpe-commands.cfg' and
'dont_blame_nrpe=1' in /etc/nagios/nrpe_local.cfg to enable the
-sitesummary checks. To make sure the nagios server can contact nrpe,
+sitesummary checks. To make sure the Icinga server can contact nrpe,
it might be required to list the server address using the
allowed_hosts option. Running these commands as root normally does
the trick.
- aptitude install nagios-nrpe-server nagios-plugins-standard
+ aptitude install nagios-nrpe-server monitoring-plugins-standard
cat > /etc/nagios/nrpe.d/sitesummary-nrpe.cfg <<EOF
allowed_hosts=myserver
dont_blame_nrpe=1
@@ -62,7 +62,7 @@
sitesummary-client
These steps can be preseeded during installation, here is an example
-to enable Nagios autoconfig on the sitesummary collector and allow it
+to enable Icinga autoconfig on the sitesummary collector and allow it
to query Nagios NRPE on the clients.
sitesummary sitesummary/enable-nagios-config boolean true
@@ -74,7 +74,7 @@
-------------------------------------
To handle hosts with hostnames missing in DNS or IP adresses not
-available directly from the Nagios and Munin server, a mechanism to
+available directly from the Icinga and Munin server, a mechanism to
map entries to new hostnames is provided.
To enable it, create a file /etc/sitesummary/hostmap or a file in
@@ -94,21 +94,21 @@
For this to work, the new-name entry must map to a IP address, either
in DNS via an entry in /etc/hosts.
-Ignoring specific Nagios checks for some hosts
+Ignoring specific Icinga checks for some hosts
----------------------------------------------
-Some times a machine have a package installed that cause some Nagios
+Some times a machine have a package installed that cause some Icinga
test to be enabled, but the service provided by the package is
-disabled and the check always fail. In this case, the Nagios test can
+disabled and the check always fail. In this case, the Icinga test can
be disabled using the /etc/sitesummary/nagiosignore file.
For example, to disable the DHCP check for a given host, add the
-hostname and the Nagios check description to
+hostname and the Icinga check description to
/etc/sitesummary/nagiosignore like this:
some.nagios.host.com process - dhcpd3
-The nagios description can be found in
+The Icinga description can be found in
/var/lib/sitesummary/nagios-generated.cfg.
Design draft
@@ -175,5 +175,5 @@
on all machines. (perl, python, /bin/sh?)
Should the client know which files to report, or should the server be
-able to affect it? Can cfengine, nagios or munin be used for this
+able to affect it? Can cfengine, icinga or munin be used for this
instead?
diff -Nru sitesummary-0.1.26/sitesummary-nodes sitesummary-0.1.26+nmu1/sitesummary-nodes
--- sitesummary-0.1.26/sitesummary-nodes 2016-11-27 10:38:45.000000000 +0100
+++ sitesummary-0.1.26+nmu1/sitesummary-nodes 2016-12-03 20:25:26.000000000 +0100
@@ -108,7 +108,8 @@
return is_pkg_installed($hostid, "nagios-nrpe-server") ||
is_pkg_installed($hostid, "nagios-text") ||
is_pkg_installed($hostid, "nagios2") ||
- is_pkg_installed($hostid, "nagios3");
+ is_pkg_installed($hostid, "nagios3") ||
+ is_pkg_installed($hostid, "icinga");
}
sub print_munin_list {
diff -Nru sitesummary-0.1.26/sitesummary-update-nagios sitesummary-0.1.26+nmu1/sitesummary-update-nagios
--- sitesummary-0.1.26/sitesummary-update-nagios 2015-05-13 16:43:09.000000000 +0200
+++ sitesummary-0.1.26+nmu1/sitesummary-update-nagios 2016-12-03 20:43:42.000000000 +0100
@@ -8,8 +8,8 @@
nagiosopts=""
# Specifies where to save the automatically generated nagios
-# configuration. Add NAGIOSCFG="/etc/nagios3/sitesummary.cfg" to
-# /etc/default/nagios3 to get Nagios to use this automatically
+# configuration. Add NAGIOSCFG="/etc/icinga/sitesummary.cfg" to
+# /etc/default/icinga to get Icinga to use this automatically
# generated configuration
NAGIOSDIR=/var/lib/sitesummary
@@ -44,21 +44,21 @@
fi
}
-# Only enable if nagios v3 and sitesummary is installed.
-if [ -f /etc/init.d/nagios3 ] && [ -x $nodes ]; then
- # Only reload nagios if the configuration changed
+# Only enable if icinga and sitesummary is installed.
+if [ -f /etc/init.d/icinga ] && [ -x $nodes ]; then
+ # Only reload icinga if the configuration changed
if generate_nagios_config ; then
# subshell to avoid passing all variables from
- # /etc/default/nagios3 to other parts of this script
+ # /etc/default/icinga to other parts of this script
(
- if [ -r /etc/default/nagios3 ] ; then
- . /etc/default/nagios3
+ if [ -r /etc/default/icinga ] ; then
+ . /etc/default/icinga
fi
- # Only reload nagios if the sitesummary config is the active
- # one and nagios3 is currently running.
- if [ /etc/nagios3/sitesummary.cfg = "$NAGIOSCFG" ] && \
- invoke-rc.d nagios3 status >/dev/null ; then
- invoke-rc.d nagios3 reload >/dev/null
+ # Only reload icinga if the sitesummary config is the active
+ # one and icinga is currently running.
+ if [ /etc/icinga/objects/sitesummary.cfg = "$NAGIOSCFG" ] && \
+ invoke-rc.d icinga status >/dev/null ; then
+ invoke-rc.d icinga reload >/dev/null
fi
)
fi
--- End Message ---