[checkmk-commits] Check_MK Git: check_mk: #2032 FIX brocade.temp: use new generic WATO rule, add Perf-O-Meter

Mathias Kettner mk at mathias-kettner.de
Sat Feb 21 10:03:39 CET 2015


Module: check_mk
Branch: master
Commit: 17c09ff0afb1f9f4e6342c466ae816e89b9159f8
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=17c09ff0afb1f9f4e6342c466ae816e89b9159f8

Author: Mathias Kettner <mk at mathias-kettner.de>
Date:   Sat Feb 21 10:03:35 2015 +0100

#2032 FIX brocade.temp: use new generic WATO rule, add Perf-O-Meter

The service description of this check has changed. Also you need to
rediscover this check in order to make use of the new generic WATO rule
for temperatures.

---

 .werks/2032                     |   11 +++++++++++
 ChangeLog                       |    2 ++
 checks/brocade                  |   23 +++++++++++++----------
 web/plugins/metrics/check_mk.py |    1 +
 4 files changed, 27 insertions(+), 10 deletions(-)

diff --git a/.werks/2032 b/.werks/2032
new file mode 100644
index 0000000..041b6de
--- /dev/null
+++ b/.werks/2032
@@ -0,0 +1,11 @@
+Title: brocade.temp: use new generic WATO rule, add Perf-O-Meter
+Level: 1
+Component: checks
+Compatible: incomp
+Version: 1.2.7i1
+Date: 1424509362
+Class: fix
+
+The service description of this check has changed. Also you need to
+rediscover this check in order to make use of the new generic WATO rule
+for temperatures.
diff --git a/ChangeLog b/ChangeLog
index 321e09a..53c2b89 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -180,6 +180,8 @@
             NOTE: Please refer to the migration notes!
     * 2031 FIX: brocade_mlx_temp: make configurable via new WATO rule, add Perf-O-Meter, add default levels...
             NOTE: Please refer to the migration notes!
+    * 2032 FIX: brocade.temp: use new generic WATO rule, add Perf-O-Meter...
+            NOTE: Please refer to the migration notes!
 
     Multisite:
     * 1758 Improved exception hander: Shows details without additional debug request, added mailto link for error report...
diff --git a/checks/brocade b/checks/brocade
index b68b729..2cba239 100644
--- a/checks/brocade
+++ b/checks/brocade
@@ -88,7 +88,7 @@ def check_brocade_power(item, _no_params, info):
     converted = brocade_sensor_convert(info, "Power")
     for snmp_item, name, value in converted:
         if item == snmp_item:
-            value = saveint(value)
+            value = int(value)
             if value != 1:
                 return 2, "Error on supply %s" % name
             return 0, "No problems found"
@@ -104,7 +104,9 @@ check_info["brocade.power"] = {
     'snmp_scan_function'    : brocade_scan,
 }
 
-brocade_temp_default_levels = ( 30, 40 )
+factory_settings["brocade_temp_default_levels"] = {
+    "levels" : ( 35, 40 )
+}
 
 def inventory_brocade_temp(info):
     converted = brocade_sensor_convert(info, "SLOT")
@@ -118,12 +120,13 @@ def check_brocade_temp(item, params, info):
 
 
 check_info["brocade.temp"] = {
-    "check_function"        : check_brocade_temp,
-    "inventory_function"    : inventory_brocade_temp,
-    "service_description"   : "Temperature %s",
-    "has_perfdata"          : True,
-    "group"                 : "hw_temperature",
-    "snmp_info"             : brocade_info,
-    'snmp_scan_function'    : brocade_scan,
-    "includes"              : [ "temperature.include" ],
+    "check_function"          : check_brocade_temp,
+    "inventory_function"      : inventory_brocade_temp,
+    "service_description"     : "Temperature Ambient %s",
+    "has_perfdata"            : True,
+    "group"                   : "temperature",
+    "snmp_info"               : brocade_info,
+    'snmp_scan_function'      : brocade_scan,
+    "default_levels_variable" : "brocade_temp_default_levels",
+    "includes"                : [ "temperature.include" ],
 }
diff --git a/web/plugins/metrics/check_mk.py b/web/plugins/metrics/check_mk.py
index 2f63e61..8c8abbc 100644
--- a/web/plugins/metrics/check_mk.py
+++ b/web/plugins/metrics/check_mk.py
@@ -397,6 +397,7 @@ check_metrics["check_mk-apc_inrow_temperature"]                 = {}
 check_metrics["check_mk-apc_symmetra_temp"]                     = {}
 check_metrics["check_mk-arris_cmts_temp"]                       = {}
 check_metrics["check_mk-bintec_sensors.temp"]                   = {}
+check_metrics["check_mk-brocade.temp"]                      = {}
 check_metrics["check_mk-brocade_mlx_temp"]                      = {}
 check_metrics["check_mk-carel_sensors"]                         = {}
 check_metrics["check_mk-casa_cpu_temp"]                         = {}



More information about the checkmk-commits mailing list