From: Alexander Barton Date: Mon, 14 Dec 2009 20:32:48 +0000 (+0100) Subject: New "Uptime" test to return the system uptime X-Git-Tag: rel-2~28 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=nagcollect.git;a=commitdiff_plain;h=2be197e1a138238302abda73fc9a44646e7ba9ac New "Uptime" test to return the system uptime Currently, this test always returns success and never any error ... --- diff --git a/client/lib/tests/Uptime.tst b/client/lib/tests/Uptime.tst new file mode 100644 index 0000000..2484c8d --- /dev/null +++ b/client/lib/tests/Uptime.tst @@ -0,0 +1,11 @@ +# NagCollect -- Nagios Data Collector for Passive Checks +# Copyright (c)2009 Alexander Barton, alex@barton.de + +SERVICE="Sys-Load_p" + +uptime=`LC_ALL=C uptime` +uptime=${uptime%,*user*} +uptime=${uptime##* up } + +STATUS=0 +TEXT="Uptime: $uptime"