Module: check_mk
Branch: master
Commit: 6a04896adc66a67e744a805fc3d246d688989d61
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6a04896adc66a6…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Wed Oct 29 13:35:43 2014 +0100
ups_socomec_out_source: Changed interpretation of states to v6 MIB (for real this time)
---
checks/ups_socomec_out_source | 33 ++++++++++++++++++++++++---------
1 file changed, 24 insertions(+), 9 deletions(-)
diff --git a/checks/ups_socomec_out_source b/checks/ups_socomec_out_source
index c64e1ca..2fe892a 100644
--- a/checks/ups_socomec_out_source
+++ b/checks/ups_socomec_out_source
@@ -30,16 +30,31 @@ def inventory_ups_socomec_out_source(info):
def check_ups_socomec_out_source(_no_item, _no_params, info):
+
+# This is from the old (v5.01) MIB and is incompatible with the new one below
+# ups_socomec_source_states = {
+# 1: (3, "Other"),
+# 2: (2, "Offline"),
+# 3: (0, "Normal"),
+# 4: (1, "Internal Maintenance Bypass"),
+# 5: (2, "On battery"),
+# 6: (0, "Booster"),
+# 7: (0, "Reducer"),
+# 8: (0, "Standby"),
+# 9: (0, "Eco mode"),
+# }
+
+# This is from the new (v6) MIB
ups_socomec_source_states = {
- 1: (3, "Other"),
- 2: (2, "Offline"),
- 3: (0, "Normal"),
- 4: (1, "Internal Maintenance Bypass"),
- 5: (2, "On battery"),
- 6: (0, "Booster"),
- 7: (0, "Reducer"),
- 8: (0, "Standby"),
- 9: (0, "Eco mode"),
+ 1: (3, "Unknown"),
+ 2: (2, "On inverter"),
+ 3: (0, "On mains"),
+ 4: (0, "Eco mode"),
+ 5: (1, "On bypass"),
+ 6: (0, "Standby"),
+ 7: (1, "On maintenance bypass"),
+ 8: (2, "UPS off"),
+ 9: (0, "Normal mode"),
}
return ups_socomec_source_states[int(info[0][0])]