aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetter Reinholdtsen <pere@hungry.com>2010-01-16 14:10:00 +0000
committerPetter Reinholdtsen <pere@hungry.com>2010-01-16 14:10:00 +0000
commit9ef8471026541e7f397f2f9f3696f6e6e53f400f (patch)
tree8d105a892c71c94ce0cc294c6ad5c3cd76ec623c
parentd62ec6362cbd1a9a3910bd136f7b9c279af6ca25 (diff)
downloadsitesummary-9ef8471026541e7f397f2f9f3696f6e6e53f400f.tar.gz
sitesummary-9ef8471026541e7f397f2f9f3696f6e6e53f400f.tar.bz2
sitesummary-9ef8471026541e7f397f2f9f3696f6e6e53f400f.tar.xz
* Collect /etc/nagios/nrpe.cfg and /etc/nagios/nrpe_local.cfg.
* Provide NRPE configuration on the clients in /etc/nagios/sitesummary-nrpe-commands.cfg
-rw-r--r--Makefile3
-rw-r--r--README5
-rwxr-xr-xcollect.d/nagios12
-rw-r--r--debian/changelog3
-rw-r--r--debian/sitesummary-client.install1
-rw-r--r--nagios-nrpe-commands.cfg10
6 files changed, 34 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 2cd5300..9d36eef 100644
--- a/Makefile
+++ b/Makefile
@@ -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)
diff --git a/README b/README
index 989faad..38dd3be 100644
--- a/README
+++ b/README
@@ -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$