From 4a547f1f5508664a6d1692c8156327e8178a6af6 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Tue, 24 Aug 2010 12:37:16 +0200 Subject: [PATCH] Add dsa-check-ups --- dsa-nagios-checks/checks/dsa-check-ups | 10 ++++++++++ dsa-nagios-checks/debian/changelog | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100755 dsa-nagios-checks/checks/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 -- 2.20.1