Module: check_mk
Branch: master
Commit: 787c60bf2b48207702e3b4bda9fd2a476302ea61
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=787c60bf2b4820…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Wed Oct 28 13:22:20 2015 +0100
systemtime: fixed unnecessary imprecision of check
the check compared a second-precision timestamp from the agent with a high-precision
timestamp from
the local system. This caused unnecessary noise in the graphs and implied to the user
higher
precision than what was actually provided.
---
checks/systemtime | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/checks/systemtime b/checks/systemtime
index 6593604..b59b8d9 100644
--- a/checks/systemtime
+++ b/checks/systemtime
@@ -35,10 +35,10 @@ def check_systemtime(item, params, info):
return (3, "no information sent by agent")
systemtime = int(info[0][0])
- ourtime = time.time()
+ ourtime = int(time.time())
offset = systemtime - ourtime
warn, crit = params
- infotext = "Offset is %+.1f sec (warn/crit at %d/%d sec)" % (offset, warn,
crit)
+ infotext = "Offset is %d sec (warn/crit at %d/%d sec)" % (offset, warn,
crit)
perfdata = [ ("offset", offset, warn, crit, 0) ]
if abs(offset) >= crit: