Module: check_mk
Branch: master
Commit: 2b17ca094253b3e8a2adf198cfd8ba9e627cd7e2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2b17ca094253b3…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Tue Feb 25 14:59:51 2014 +0100
FIX brocade_mlx: omit inventory of cpu and memory on more states
If for a module the status is "Blocked for full height card" it is omitted
during inventory for CPU and Memory checks, because there is no sense in
checking them.
---
.werks/703 | 10 ++++++++++
ChangeLog | 3 ++-
checkman/brocade_mlx.module_cpu | 4 ++--
checkman/brocade_mlx.module_mem | 4 ++--
checks/brocade_mlx | 8 ++++----
5 files changed, 20 insertions(+), 9 deletions(-)
diff --git a/.werks/703 b/.werks/703
new file mode 100644
index 0000000..b99be07
--- /dev/null
+++ b/.werks/703
@@ -0,0 +1,10 @@
+Title: brocade_mlx: omit inventory of cpu and memory on more states
+Level: 1
+Component: checks
+Version: 1.2.5i1
+Date: 1393336534
+Class: fix
+
+If for a module the status is "Blocked for full height card" it is omitted
+during inventory for CPU and Memory checks, because there is no sense in
+checking them.
diff --git a/ChangeLog b/ChangeLog
index d6ac156..3c1e5b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -93,8 +93,8 @@
* 0556 esx_vsphere_counters.diskio: now also shows disk latency
* 0583 stulz_pump: now monitors the pumps rpm in precent of maximum and gathers
performance data
* 0560 check_mk_agent.solaris: report statgrab_mem section if solaris_mem section is
missing...
- * 0586 rmon_stats: new snmp check to gather network traffic statistics on RMON
enabled network interfaces
* 0702 Rule for checking agents for wanted version...
+ * 0586 rmon_stats: new snmp check to gather network traffic statistics on RMON
enabled network interfaces
* 0103 FIX: services: Fixed bug with service inventory defined in main.mk...
* 0299 FIX: borcade_mlx_fan: Prettified output, handling "other" state now
* 0300 FIX: cisco_fru_power: Trying not to inventorize not plugged in FRUs...
@@ -187,6 +187,7 @@
* 0719 FIX: postfix_mailq: fix Linux agent in case of ssmtp being installed
* 0584 FIX: agent_vsphere: special agent now handles non-standard https port
correctly...
* 0585 FIX: check_mk_agent.linux: more efficient handling of cups printer queues...
+ * 0703 FIX: brocade_mlx: omit inventory of cpu and memory on more states...
Multisite:
* 0371 Added log class filter to hostsvcevents view
diff --git a/checkman/brocade_mlx.module_cpu b/checkman/brocade_mlx.module_cpu
index 876f9c3..4c79c8e 100644
--- a/checkman/brocade_mlx.module_cpu
+++ b/checkman/brocade_mlx.module_cpu
@@ -38,8 +38,8 @@ perfdata:
cpu_util60 together with warn and crit levels.
inventory:
- Finds one item per NI-MLX module.
- Empty modules are omitted.
+ Finds one item per NI-MLX or BR-MLX module.
+ Modules with state "empty" or "Blocked for full height card" are
omitted.
[parameters]
parameters (dict): with the element
diff --git a/checkman/brocade_mlx.module_mem b/checkman/brocade_mlx.module_mem
index e3d3974..b8df961 100644
--- a/checkman/brocade_mlx.module_mem
+++ b/checkman/brocade_mlx.module_mem
@@ -33,8 +33,8 @@ perfdata:
together with warn and crit levels and maximum value
inventory:
- Finds one item per NI-MLX module.
- Empty modules are omitted.
+ Finds one item per NI-MLX or BR-MLX module.
+ Modules with state "empty" or "Blocked for full height card" are
omitted.
[parameters]
parameters (dict): with the element
diff --git a/checks/brocade_mlx b/checks/brocade_mlx
index c8eb27d..7707820 100644
--- a/checks/brocade_mlx
+++ b/checks/brocade_mlx
@@ -102,9 +102,9 @@ brocade_mlx_mem_default_levels = { "levels": (80.0, 90.0) }
def inventory_brocade_mlx_module_mem(info):
inventory = []
for module_id, module_descr, module_state, mem_total, mem_avail in info[0]:
- # do not inventorize modules reported as empty
+ # do not inventorize modules reported as empty or "Blocked for full height
card"
# and: monitor cpu only on NI-MLX and BR-MLX modules
- if module_state != "0" and (
module_descr.startswith("NI-MLX") or module_descr.startswith("BR-MLX")
):
+ if module_state != "0" and module_state != "11" and (
module_descr.startswith("NI-MLX") or module_descr.startswith("BR-MLX")
):
inventory.append( (brocade_mlx_combine_item(module_id, module_descr),
"brocade_mlx_mem_default_levels") )
return inventory
@@ -170,9 +170,9 @@ brocade_mlx_cpu_default_levels = { "levels" : (80.0, 90.0)
}
def inventory_brocade_mlx_module_cpu(info):
inventory = []
for module_id, module_descr, module_state, mem_total, mem_avail in info[0]:
- # do not inventorize modules reported as empty
+ # do not inventorize modules reported as empty or "Blocked for full height
card"
# and: monitor cpu only on NI-MLX and BR-MLX modules
- if module_state != "0" and (
module_descr.startswith("NI-MLX") or module_descr.startswith("BR-MLX")
):
+ if module_state != "0" and module_state != "11" and (
module_descr.startswith("NI-MLX") or module_descr.startswith("BR-MLX")
):
inventory.append( (brocade_mlx_combine_item(module_id, module_descr),
"brocade_mlx_cpu_default_levels") )
return inventory