Module: check_mk
Branch: master
Commit: 95436160993cb6a27d377a3fe32e3ec2c58db59c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=95436160993cb6…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Feb 2 17:31:21 2012 +0100
if/if64: omit check result on counter wrap
But only if bandwidth traffic levels
are used.
---
ChangeLog | 2 ++
checks/if.include | 4 ++++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 4af43e1..ec5c357 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -47,6 +47,8 @@
* cisco_temp_sensor: new check for temperature sensors of Cisco NEXUS
and other new Cisco devices
* oracle_tablespace: Fixed tablespace size/free space calculations
+ * FIX: if/if64: omit check result on counter wrap if bandwidth traffic levels
+ are used.
Multisite:
* Improve transaction handling and reload detection: user can have
diff --git a/checks/if.include b/checks/if.include
index dedc1fd..f8ec10b 100644
--- a/checks/if.include
+++ b/checks/if.include
@@ -264,6 +264,10 @@ def check_if_common(item, params, info):
# if at least one counter wrapped, we do not handle the counters at all
if wrapped:
+ # If there is a threshold on the bandwidth, we cannot proceed
+ # futher (the check would be flapping to green on a wrap)
+ if bw_crit != None:
+ raise MKCounterWrapped("", "Counter wrap, skipping
checks this time")
perfdata = []
else:
perfdata.append(("outqlen", saveint(ifOutQLen)))