Module: check_mk
Branch: master
Commit: 0b56e58e8d2742149da972506ecdc9dc2a60667d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0b56e58e8d2742…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Wed Jan 11 13:59:02 2017 +0100
Be a bit more lenient when starting/stopping omd during tests.
Change-Id: I500223d17b1c05534765b43b987dda14e501d967
---
tests/testlib/__init__.py | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/tests/testlib/__init__.py b/tests/testlib/__init__.py
index 9e6345f..75763ff 100644
--- a/tests/testlib/__init__.py
+++ b/tests/testlib/__init__.py
@@ -309,16 +309,26 @@ class Site(object):
def start(self):
if not self.is_running():
assert omd(["start", self.id]) == 0
- if not self.is_running():
- raise Exception("The site %s is not running completely after starting" % self.id)
-
+ i = 0
+ while not self.is_running():
+ i += 1
+ if i > 10:
+ raise Exception("Could not start site %s" % self.id)
+ print("The site %s is not running yet, sleeping... (round %d)" % (self.id, i))
+ sys.stdout.flush()
+ time.sleep(0.2)
def stop(self):
if self.is_running():
assert omd(["stop", self.id]) == 0
- if self.is_running():
- raise Exception("The site %s is not completely stopped after stopping" % self.id)
-
+ i = 0
+ while self.is_running():
+ i += 1
+ if i > 10:
+ raise Exception("Could not stop site %s" % self.id)
+ print("The site %s is still running, sleeping... (round %d)" % (self.id, i))
+ sys.stdout.flush()
+ time.sleep(0.2)
def exists(self):
return os.path.exists("/omd/sites/%s" % self.id)
Module: check_mk
Branch: master
Commit: 6d91cc5a9cb7528623f41705388b10935860e6de
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6d91cc5a9cb752…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jan 11 13:41:00 2017 +0100
4268 FIX cisco_vpn_tunnel: Reporting zero traffic in case the tunnel is down
Previous versions of the check were not providing any performance data in case
the tunnel was down. The graphs were showing flat lines for the time the tunnel
was down which could lead to confusions because in fact there was no traffic
at all.
Change-Id: If56d55bb03ee0b9ab661408d742754d6bcf2282b
---
.werks/4268 | 13 +++++++++++++
ChangeLog | 1 +
checks/cisco_vpn_tunnel | 3 ++-
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/.werks/4268 b/.werks/4268
new file mode 100644
index 0000000..8a885bb
--- /dev/null
+++ b/.werks/4268
@@ -0,0 +1,13 @@
+Title: cisco_vpn_tunnel: Reporting zero traffic in case the tunnel is down
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.4.0i4
+Date: 1484138387
+
+Previous versions of the check were not providing any performance data in case
+the tunnel was down. The graphs were showing flat lines for the time the tunnel
+was down which could lead to confusions because in fact there was no traffic
+at all.
diff --git a/ChangeLog b/ChangeLog
index 71264a3..e356add 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -39,6 +39,7 @@
* 4265 FIX: netapp_api_cpu: fixed missing number of cpus
* 4266 FIX: quantum_libsmall_status: fixed scan function
* 4287 FIX: job: fixed incomplete data handling...
+ * 4268 FIX: cisco_vpn_tunnel: Reporting zero traffic in case the tunnel is down...
Multisite:
* 4169 View action: Default values of sticky, notification and persistent options can now be configured via global settings....
diff --git a/checks/cisco_vpn_tunnel b/checks/cisco_vpn_tunnel
index 6d8302c..0ebdf62 100644
--- a/checks/cisco_vpn_tunnel
+++ b/checks/cisco_vpn_tunnel
@@ -466,7 +466,8 @@ def check_cisco_vpn_tunnel(item, params, parsed):
[('if_in_octets', phase1_in_rate + phase2_in_rate),
('if_out_octets', phase1_out_rate + phase2_out_rate)]
- return tunnel_not_found_state, "%sTunnel is missing" % alias
+ return tunnel_not_found_state, "%sTunnel is missing" % alias, \
+ [('if_in_octets', 0), ('if_out_octets', 0)]
check_info["cisco_vpn_tunnel"] = {