Add dsa-check-ups
authorPeter Palfrader <peter@palfrader.org>
Tue, 24 Aug 2010 10:37:16 +0000 (12:37 +0200)
committerPeter Palfrader <peter@palfrader.org>
Tue, 24 Aug 2010 10:37:16 +0000 (12:37 +0200)
dsa-nagios-checks/checks/dsa-check-ups [new file with mode: 0755]
dsa-nagios-checks/debian/changelog

diff --git a/dsa-nagios-checks/checks/dsa-check-ups b/dsa-nagios-checks/checks/dsa-check-ups
new file mode 100755 (executable)
index 0000000..86d132c
--- /dev/null
@@ -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
index 7fd7f98..76d7f3c 100644 (file)
@@ -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 <weasel@debian.org>  Thu, 12 Aug 2010 13:46:44 +0200
+ -- Peter Palfrader <weasel@debian.org>  Tue, 24 Aug 2010 12:36:56 +0200
 
 dsa-nagios-checks (87) unstable; urgency=low