Module: check_mk
Branch: master
Commit: 047d85e56e8337ddc55846a3cb894530bccee3a2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=047d85e56e8337…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Jun 2 16:06:54 2015 +0200
small addition for mknotifyd check
---
checks/mknotifyd | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/checks/mknotifyd b/checks/mknotifyd
index a839d54..f6ceecf 100644
--- a/checks/mknotifyd
+++ b/checks/mknotifyd
@@ -80,8 +80,12 @@ def parse_mknotifyd(info):
else:
if value == "None":
value = None
- elif value and varname not in [ "Type", "State",
"Version", "Status Message", "Pending Acknowledgements" ]:
+ elif value and varname not in [
+ "Type", "State", "Version",
"Status Message",
+ "Pending Acknowledgements", "Connect Time" ]:
value = int(value.split()[0])
+ elif varname == "Connect Time":
+ value = float(value.split()[0])
sub_entry[varname] = value
# Fixup names of the connections. For incoming connections the remote
@@ -213,6 +217,9 @@ def check_mknotifyd_connection(item, _no_params, parsed):
age = now - connection["Since"]
yield 0, "Uptime: %s" % get_age_human_readable(age)
+ if "Connect Time" in connection:
+ yield 0, "Connect time: %.3f sec" % connection["Connect
Time"]
+
# Stats
for what in ( "Sent", "Received" ):
num = connection["Notifications " + what]