Module: check_mk
Branch: master
Commit: 2b7ff57d3ba0df18c59e8444917c8561c02bf243
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2b7ff57d3ba0df…
Author: Florian Kromer <fk(a)mathias-kettner.de>
Date: Thu Mar 7 16:39:18 2019 +0100
ucs_c_rack_server_fans: Make reliable against namespace conflict
Change-Id: I76ed9ad879a8c32aff4c0ca66d64b38b85452f0f
---
checks/ucs_c_rack_server_fans | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/checks/ucs_c_rack_server_fans b/checks/ucs_c_rack_server_fans
index ae7f66a..3ac49d6 100644
--- a/checks/ucs_c_rack_server_fans
+++ b/checks/ucs_c_rack_server_fans
@@ -46,15 +46,13 @@ def parse_ucs_c_rack_server_fans(info):
return parsed
-operability_to_status_mapping = {
- "unknown": 3,
- "operable": 0,
- "inoperable": 2,
-}
-
-
@get_parsed_item_data
def check_ucs_c_rack_server_fans(item, _no_params, data):
+ operability_to_status_mapping = {
+ "unknown": 3,
+ "operable": 0,
+ "inoperable": 2,
+ }
operability = data["operability"]
try:
status = operability_to_status_mapping[operability]