Module: check_mk
Branch: master
Commit: d869d8c2f4fb709c99b52054077e49cff130a160
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d869d8c2f4fb70…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Thu Jul 19 08:07:34 2018 +0200
Minor cleanup
Change-Id: I7f86bfb24f8b7273b1abb904411d2b8b973adfc8
---
checks/netstat | 10 ++++------
checks/win_netstat | 10 +++-------
2 files changed, 7 insertions(+), 13 deletions(-)
diff --git a/checks/netstat b/checks/netstat
index 8732f59..cc30e7d 100644
--- a/checks/netstat
+++ b/checks/netstat
@@ -51,6 +51,7 @@
# udp 0 0 10.1.2.160:137 0.0.0.0:*
# udp 0 0 0.0.0.0:137 0.0.0.0:*
+
def parse_netstat(info):
connections = []
for line in info:
@@ -75,15 +76,12 @@ def parse_netstat(info):
return connections
-def check_netstat(item, params, info):
- connections = parse_netstat(info)
- return check_netstat_generic(item, params, connections)
-
check_info["netstat"] = {
- 'check_function' : check_netstat,
+ 'parse_function' : parse_netstat,
+ 'check_function' : check_netstat_generic,
'service_description' : "TCP Connection %s",
'group' : "tcp_connections",
- 'includes' : [ "netstat.include" ],
+ 'includes' : ["netstat.include"],
'has_perfdata' : True,
}
diff --git a/checks/win_netstat b/checks/win_netstat
index f7978fd..9b289ad 100644
--- a/checks/win_netstat
+++ b/checks/win_netstat
@@ -77,15 +77,11 @@ def parse_win_netstat(info):
return connections
-def check_win_netstat(item, params, info):
- connections = parse_win_netstat(info)
- return check_netstat_generic(item, params, connections)
-
-
check_info["win_netstat"] = {
- 'check_function' : check_win_netstat,
+ 'parse_function' : parse_win_netstat,
+ 'check_function' : check_netstat_generic,
'service_description' : "TCP Connection %s",
'group' : "tcp_connections",
- 'includes' : [ "netstat.include" ],
+ 'includes' : ["netstat.include"],
'has_perfdata' : True,
}