From: Alexander Barton Date: Wed, 21 Apr 2010 12:05:41 +0000 (+0200) Subject: New "nagcollectreset" tool to restrict/reset test status X-Git-Tag: rel-2~14 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=nagcollect.git;a=commitdiff_plain;h=eafbc117dc3d950474cd5af971d839541557a457 New "nagcollectreset" tool to restrict/reset test status All test scripts should only consider the system status starting the moment this tool is executed and ignore all older states. --- diff --git a/Makefile b/Makefile index aef74d5..9e9c832 100644 --- 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 index 0000000..a91947d --- /dev/null +++ b/client/bin/nagcollectreset @@ -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-- ($*)"