New "nagcollectreset" tool to restrict/reset test status
authorAlexander Barton <alex@barton.de>
Wed, 21 Apr 2010 12:05:41 +0000 (14:05 +0200)
committerAlexander Barton <alex@barton.de>
Wed, 21 Apr 2010 12:05:41 +0000 (14:05 +0200)
All test scripts should only consider the system status starting
the moment this tool is executed and ignore all older states.

Makefile
client/bin/nagcollectreset [new file with mode: 0755]

index aef74d5..9e9c832 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -37,6 +37,8 @@ install-client:
        install -d -o 0 -g 0 -m 755 /usr/local/sbin
        install -c -o 0 -g 0 -m 755 -p \
                client/bin/nagcollect /usr/local/sbin/nagcollect
+       install -c -o 0 -g 0 -m 755 -p \
+               client/bin/nagcollectreset /usr/local/sbin/nagcollectreset
        install -d -o 0 -g 0 -m 755 /usr/local/etc
        [ -r /usr/local/etc/nagcollect.conf ] || \
         install -o 0 -g 0 -m 600 -p \
diff --git a/client/bin/nagcollectreset b/client/bin/nagcollectreset
new file mode 100755 (executable)
index 0000000..a91947d
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/bash
+#
+# NagCollect -- Nagios Data Collector for Passive Checks
+# Copyright (c)2009,2010 Alexander Barton, alex@barton.de
+#
+
+NAME=`basename "$0"`
+
+[ -z "$*" ] \
+       && logger -t "$NAME" -- "--NagiosReset--" \
+       || logger -t "$NAME" -- "--NagiosReset-- ($*)"