Module: check_mk
Branch: master
Commit: fea8329d785c8e43ee5d950e2f9acae5e8bb42f2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fea8329d785c8e…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Thu Jul 21 08:46:48 2016 +0200
ipmi: Make parse function explicit
---
checks/ipmi | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/checks/ipmi b/checks/ipmi
index 3c574c8..cb18678 100644
--- a/checks/ipmi
+++ b/checks/ipmi
@@ -160,8 +160,7 @@ def parse_ipmi(info):
return parsed
-def inventory_ipmi(info):
- parsed = parse_ipmi(info)
+def inventory_ipmi(parsed):
summarize = True
rules = host_extra_conf(g_hostname, inventory_ipmi_rules)
if rules:
@@ -178,8 +177,7 @@ def inventory_ipmi(info):
yield "Summary", None
-def check_ipmi(item, params, info):
- parsed = parse_ipmi(info)
+def check_ipmi(item, params, parsed):
if item == "Summary":
return check_ipmi_summarized(parsed, params)
else:
@@ -296,6 +294,7 @@ check_config_variables.append("ipmi_ignored_sensors")
check_info["ipmi"] = {
+ 'parse_function' : parse_ipmi,
'inventory_function' : inventory_ipmi,
'check_function' : check_ipmi,
'service_description' : 'IPMI Sensor %s',