From 871b93ff3ea44905b65758ab6b8ed4e32f1fdd74 Mon Sep 17 00:00:00 2001
From: Per Cederqvist <ceder@lysator.liu.se>
Date: Tue, 19 Dec 2006 10:52:14 +0000
Subject: [PATCH] Warn if no activity for 1.5 hours.  Fix messages.

---
 check_syslog | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/check_syslog b/check_syslog
index 2716ce4..971e19e 100755
--- a/check_syslog
+++ b/check_syslog
@@ -43,11 +43,11 @@ def check_host(hostname):
         print "CRITICAL - no activity within the last 14 days"
         sys.exit(2)
     age = time.time() - statval.st_mtime
-    if age > 10 * 3600:
-        print "WARNING - no activity for %.1g hours" % (age / 3600.0)
+    if age > 1.5 * 3600:
+        print "WARNING - no activity for %.1f hours" % (age / 3600.0)
         sys.exit(1)
     else:
-        print "OK - activity %.2g hours ago" % (age / 3600.0)
+        print "OK - activity %.2f minutes ago" % (age / 60.0)
     
 
 if __name__ == '__main__':
-- 
GitLab