From: Peter Palfrader Date: Tue, 24 Aug 2010 10:37:16 +0000 (+0200) Subject: Add dsa-check-ups X-Git-Url: https://wiki.adam-barratt.org.uk/gitweb/?a=commitdiff_plain;h=4a547f1f5508664a6d1692c8156327e8178a6af6;p=mirror%2Fdsa-nagios.git Add dsa-check-ups --- diff --git a/dsa-nagios-checks/checks/dsa-check-ups b/dsa-nagios-checks/checks/dsa-check-ups new file mode 100755 index 0000000..86d132c --- /dev/null +++ b/dsa-nagios-checks/checks/dsa-check-ups @@ -0,0 +1,10 @@ +#!/bin/bash + +st=$(upsc ups1@localhost | awk -F: '$1 == "ups.status" {print $2}' | sed -e 's/^ *//') +if [ "$st" = "OL CHRG" ]; then + echo "OK: Status is $st" + exit 0 +else + echo "Warning: Status is $st" + exit 1 +fi diff --git a/dsa-nagios-checks/debian/changelog b/dsa-nagios-checks/debian/changelog index 7fd7f98..76d7f3c 100644 --- a/dsa-nagios-checks/debian/changelog +++ b/dsa-nagios-checks/debian/changelog @@ -3,8 +3,9 @@ dsa-nagios-checks (8x) xnstable; urgency=low * dsa-check-hpacucli: Also accept 'Unknown, 3.0GBPS' as a valid transfer speed in addition to '3.0GBPS, Unknown'. * dsa-check-hpacucli add --ignore-transfer-speed option. + * Add dsa-check-ups. - -- Peter Palfrader Thu, 12 Aug 2010 13:46:44 +0200 + -- Peter Palfrader Tue, 24 Aug 2010 12:36:56 +0200 dsa-nagios-checks (87) unstable; urgency=low