Module: check_mk
Branch: master
Commit: 4bd0ed2fb4bc659b43b223380d1eac6a49e95350
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4bd0ed2fb4bc65…
Author: Florian Heigl <fh(a)mathias-kettner.de>
Date: Fri Jul 15 10:02:32 2011 +0200
if/i64 fixed operstate monitoring (and this time not roll in an older version, too)
---
checks/if.include | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/checks/if.include b/checks/if.include
index 8213c17..fd701e5 100644
--- a/checks/if.include
+++ b/checks/if.include
@@ -136,7 +136,7 @@ def check_if_common(item, params, info):
elif len(params) == 5:
err_warn, err_crit, targetspeed, bw_warn, bw_crit = params
elif len(params) == 6:
- err_warn, err_crit, targetspeed, bw_warn, bw_crit, allowed_operstates = params
+ err_warn, err_crit, targetspeed, bw_warn, bw_crit, targetstate = params
for ifIndex, ifDescr, ifType, ifSpeed, ifOperStatus, ifInOctets, \
inucast, inmcast, inbcast, ifInDiscards, ifInErrors, ifOutOctets, \
@@ -170,7 +170,7 @@ def check_if_common(item, params, info):
operstatus = if_statename(str(ifOperStatus))
if targetstate and \
(ifOperStatus != targetstate
- and not (type(targetstate) == list and ifOperStatus in targetstate)):
+ and not (type(targetstate) in [ list, tuple ] and ifOperStatus in
targetstate)):
state = 2
infotext += "(%s!!) " % operstatus
else: