Module: check_mk
Branch: master
Commit: 24f5c142248dfe8b41dbc754584085148aa1c1bc
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=24f5c142248dfe…
Author: Florian Heigl <fh(a)mathias-kettner.de>
Date: Fri Jul 22 10:13:53 2011 +0200
f5_bigip_fans: new check parameter f5_bigip_fans_default_levels that makes the warn/crit
RPMs configurable. Sane defaults are included.
---
checkman/f5_bigip_fans | 9 ++++++++-
checks/f5_bigip_fans | 12 +++++-------
2 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/checkman/f5_bigip_fans b/checkman/f5_bigip_fans
index dda7328..51ad94c 100644
--- a/checkman/f5_bigip_fans
+++ b/checkman/f5_bigip_fans
@@ -5,7 +5,8 @@ license: GPL
distribution: check_mk
description:
The check queries the MIB tables of F5 BIG-IP loadbalancers (local traffic managers) for
the
- status of builtin fans. It will alert if the rotational speed falls to lower-than-normal
levels.
+ status of builtin fans. It will alert if the rotational speed falls below user-definable
+ levels.
It supports devices running the 9.0 and above releases of the F5 OS. It's tested
against 9.3
devices.
@@ -17,5 +18,11 @@ inventory:
It labels them as either chassis or CPU fans.
+parameters:
+ f5_bigip_fans_default_levels (warn, crit) - if a fan item spins with less than
+ this many rotations per minute, then we the check will return warn or crit.
+ The default is 2000 and 500 RPM.
+
+
perfdata:
the check does not (yet) generate performance data.
diff --git a/checks/f5_bigip_fans b/checks/f5_bigip_fans
index 210c649..a8e837b 100644
--- a/checks/f5_bigip_fans
+++ b/checks/f5_bigip_fans
@@ -32,6 +32,9 @@
# sysCpuGroup
+f5_bigip_fans_default_levels = (2000,500)
+
+
def f5_bigip_fans_genitem(fanid):
fanid = int(fanid)
if fanid < 10:
@@ -47,7 +50,7 @@ def inventory_f5_bigip_fans(checkname, info):
inventory = []
for line in info:
for fanentry in line:
- inventory.append((f5_bigip_fans_genitem(fanentry[0]), None))
+ inventory.append((f5_bigip_fans_genitem(fanentry[0]),
"f5_bigip_fans_default_levels"))
return inventory
@@ -57,12 +60,7 @@ def check_f5_bigip_fans(item, _no_params, info):
for fanentry in line:
if f5_bigip_fans_genitem(fanentry[0]) == item:
speed = int(fanentry[1])
- if "Chassis" in item:
- # the "normal" speed is around 10K RPM
- warn, crit = (7500, 2000)
- else:
- # F5's CPU Fans run around 6K RPM
- warn, crit = (4000, 1200)
+ warn, crit = f5_bigip_fans_default_levels
msgtxt = " - speed is %d rpm" % speed
if speed > warn:
return (0, "OK" + msgtxt)