Module: check_mk
Branch: master
Commit: acf3a001da12940e29c9f86ae0ce61d1e3764670
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=acf3a001da1294…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Tue Nov 5 18:17:39 2013 +0100
brocade_mlx: check manpages
---
checkman/brocade_mlx.module_cpu | 52 ++++++++++++++++++++++++++++++++++++++
checkman/brocade_mlx.module_mem | 4 +--
checkman/brocade_mlx.temperature | 43 +++++++++++++++++++++++++++++++
checks/brocade_mlx | 2 +-
4 files changed, 98 insertions(+), 3 deletions(-)
diff --git a/checkman/brocade_mlx.module_cpu b/checkman/brocade_mlx.module_cpu
new file mode 100644
index 0000000..5a29277
--- /dev/null
+++ b/checkman/brocade_mlx.module_cpu
@@ -0,0 +1,52 @@
+title: Brocade NetIron MLX devices: NI-MLX Module CPU Utilization
+agents: snmp
+catalog: hw/network/brocade
+license: GPL
+distribution: check_mk
+description:
+ Checks the Module CPU Utilization of a NI-MLX module in Brocade
+ NetIron MLX switching / routing devices.
+
+ {WARN} or {CRIT} is returned, if the usage in the last 60 sec was above
+ given thresholds. {OK} is returned otherwise.
+
+ Please note: Even if the check reports and graphs the CPU Utilization in
+ the last 1/5/60/300 sec, the thresholds are only checked against the value
+ of the last 60 sec. The other values are informational only.
+
+item:
+ If a module description is delivered by SNMP, the item is build from the
+ module ID plus the description. Otherwise it is just the ID.
+
+examples:
+ # set default levels to 70 and 80 percent:
+ brocade_mlx_cpu_default_levels = (70.0, 80.0)
+
+ # Check Module with ID 33 on a box called my-mlx-device with default levels
+ checks += [
+ ("my-mlx-device", "brocade_mlx.module_cpu", '33 NI-MLX-32_MR
Management Module', brocade_mlx_cpu_default_levels),
+ ]
+
+ # or use individual levels for warn and crit
+ checks += [
+ ("my-mlx-device", "brocade_mlx.module_cpu", '33 NI-MLX-32_MR
Management Module', (75.0, 85.0)),
+ ]
+
+perfdata:
+ four value are returned, cpu_util1, cpu_util5, cpu_util60 and cpu_util300:
+ The CPU Utilization (in percent) in the last 1/5/60/300 sec.
+ cpu_util60 together with warn and crit levels.
+
+inventory:
+ Finds one item per NI-MLX module.
+ Empty modules are omitted.
+
+[parameters]
+warn(float): {WARN} state is triggered, if the CPU utilization in percent is higher
+ than this.
+crit(float): {CRIT} state is triggered, if the CPU utilization in percent is higher
+ than this.
+
+[configuration]
+brocade_mlx_cpu_default_levels(float, float): The standard levels for {WARN} and
+ {CRIT}. Defaults are (80.0, 90.0)
diff --git a/checkman/brocade_mlx.module_mem b/checkman/brocade_mlx.module_mem
index 4faa737..df88967 100644
--- a/checkman/brocade_mlx.module_mem
+++ b/checkman/brocade_mlx.module_mem
@@ -37,9 +37,9 @@ inventory:
Empty modules are omitted.
[parameters]
-warn(int): {WARN} state is triggered, if the memory usage in percent is higher
+warn(float): {WARN} state is triggered, if the memory usage in percent is higher
than this.
-crit(int): {CRIT} state is triggered, if the memory usage in percent is higher
+crit(float): {CRIT} state is triggered, if the memory usage in percent is higher
than this.
[configuration]
diff --git a/checkman/brocade_mlx.temperature b/checkman/brocade_mlx.temperature
new file mode 100644
index 0000000..0502d6d
--- /dev/null
+++ b/checkman/brocade_mlx.temperature
@@ -0,0 +1,43 @@
+title: Brocade NetIron MLX devices: Temperature Sensors
+agents: snmp
+catalog: hw/network/brocade
+license: GPL
+distribution: check_mk
+description:
+ Checks the temperature sensors in Brocade NetIron MLX switching / routing
+ devices.
+
+ {WARN} or {CRIT} is returned, if the temperature is above given thresholds.
+ {OK} is returned otherwise.
+
+item:
+ The description of the temperature sensor as provided by SNMP.
+
+examples:
+ # set default levels to 70°C and 80°C:
+ brocade_mlx_temperature_default_levels = (70, 80)
+
+ # Check a sensor with description Switch Fabric module 0, sensor 1 temperature
+ # on a box called my-mlx-device with default levels
+ checks += [
+ ("my-mlx-device", "brocade_mlx.temperature", 'Switch Fabric
module 0, sensor 1 temperature', brocade_mlx_temperature_default_levels)
+ ]
+
+ # or use individual levels for warn and crit
+ checks += [
+ ("my-mlx-device", "brocade_mlx.temperature", 'Switch Fabric
module 0, sensor 1 temperature', (80, 100)
+ ]
+
+perfdata:
+ one value is returned: The temperature in °C, together with warn and crit levels
+
+inventory:
+ Finds one item per temperature sensor
+
+[parameters]
+warn(int): {WARN} state is triggered, if the temperature is higher than this.
+crit(int): {CRIT} state is triggered, if the temperature is higher than this.
+
+[configuration]
+brocade_mlx_temperature_default_levels(int, int): The standard levels for {WARN}
+ and {CRIT}. Defaults are (100, 120)
diff --git a/checks/brocade_mlx b/checks/brocade_mlx
index f8bec7a..782a247 100644
--- a/checks/brocade_mlx
+++ b/checks/brocade_mlx
@@ -170,7 +170,7 @@ def check_brocade_mlx_module_mem(item, params, info):
status = 2
errorstring = " (!!)"
- return status, "%s Bytes used (%0.1f%%%s) of total %s Bytes" % \
+ return status, "%s used (%0.1f%%%s) of total %s" % \
(get_bytes_human_readable(mem_used), mem_used_percent, \
errorstring, get_bytes_human_readable(mem_total)), \
perfdata