diff options
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | README | 5 | ||||
-rwxr-xr-x | collect.d/nagios | 12 | ||||
-rw-r--r-- | debian/changelog | 3 | ||||
-rw-r--r-- | debian/sitesummary-client.install | 1 | ||||
-rw-r--r-- | nagios-nrpe-commands.cfg | 10 |
6 files changed, 34 insertions, 0 deletions
@@ -62,6 +62,9 @@ install-server: $(DESTDIR)/etc/nagios3/sitesummary.cfg $(INSTALL_DATA) nagios-templates.cfg \ $(DESTDIR)/etc/nagios3/sitesummary-templates.cfg + $(INSTALL) -d $(DESTDIR)/etc/nagios + $(INSTALL_DATA) nagios-nrpe-commands.cfg \ + $(DESTDIR)/etc/nagios/sitesummary-nrpe-commands.cfg install-client: $(INSTALL) -d $(DESTDIR)$(sbindir) @@ -40,6 +40,11 @@ The current version of the code run all Nagios 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' in +/etc/nagios/nrpe_local.cfg to enable the sitesummary checks and edit +/etc/nagios/nrpe.cfg to use 'dont_blame_nrpe=1'. + Design draft ------------ system to collect key info about all the machines on a site, to help diff --git a/collect.d/nagios b/collect.d/nagios new file mode 100755 index 0000000..e2de8d1 --- /dev/null +++ b/collect.d/nagios @@ -0,0 +1,12 @@ +#!/bin/sh + +PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin + +mkdir nagios && cd nagios + +if [ -e /etc/nagios/nrpe.cfg ] ; then + cp /etc/nagios/nrpe.cfg nrpe.cfg +fi +if [ -e /etc/nagios/nrpe_local.cfg ] ; then + cp /etc/nagios/nrpe_local.cfg nrpe_local.cfg +fi diff --git a/debian/changelog b/debian/changelog index 4478300..9b6a702 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,9 @@ sitesummary (0.0.54) UNRELEASED; urgency=low configuration by default. * Add checks for running cron and working dhcp to Nagios configuration. + * Collect /etc/nagios/nrpe.cfg and /etc/nagios/nrpe_local.cfg. + * Provide NRPE configuration on the clients in + /etc/nagios/sitesummary-nrpe-commands.cfg -- Petter Reinholdtsen <pere@debian.org> Sat, 16 Jan 2010 01:39:35 +0100 diff --git a/debian/sitesummary-client.install b/debian/sitesummary-client.install index d4ec071..eb1f317 100644 --- a/debian/sitesummary-client.install +++ b/debian/sitesummary-client.install @@ -1,3 +1,4 @@ +debian/tmp/etc/nagios debian/tmp/usr/lib/sitesummary/collect.d debian/tmp/usr/sbin/sitesummary-client debian/tmp/usr/sbin/sitesummary-upload diff --git a/nagios-nrpe-commands.cfg b/nagios-nrpe-commands.cfg new file mode 100644 index 0000000..6a03cc9 --- /dev/null +++ b/nagios-nrpe-commands.cfg @@ -0,0 +1,10 @@ +# +# NRPE commands used by sitesummary generated Nagios checks. +# +command[check_apt]=/usr/lib/nagios/plugins/check_apt +command[check_disk]=/usr/lib/nagios/plugins/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$ +command[check_nfs]=/usr/lib/nagios/plugins/check_rpc -H localhost -C nfs -c2,3 +command[check_ntp]=/usr/lib/nagios/plugins/check_ntp -H localhost +command[check_procs]=/usr/lib/nagios/plugins/check_procs -w $ARG1$ -c $ARG2$ +command[check_procs_zombie]=/usr/lib/nagios/plugins/check_procs -w $ARG1$ -c $ARG2$ -s Z +command[check_swap]=/usr/lib/nagios/plugins/check_swap -w $ARG1 -c $ARG2$ |