Module: check_mk
Branch: master
Commit: 11ec93b6d6d03b5170404752950e4dc0aee149d1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=11ec93b6d6d03b…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Fri Dec 4 12:43:43 2015 +0100
#2808 FIX db2_connections: added missing connections performance data
---
.werks/2808 | 9 +++++++++
ChangeLog | 1 +
checks/db2_connections | 9 +++++----
3 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/.werks/2808 b/.werks/2808
new file mode 100644
index 0000000..84ee7c4
--- /dev/null
+++ b/.werks/2808
@@ -0,0 +1,9 @@
+Title: db2_connections: added missing connections performance data
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1449229404
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index b700825..8ab52d8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -139,6 +139,7 @@
NOTE: Please refer to the migration notes!
* 1310 FIX: blade_bx_powerfan: Check now uses better default leves...
* 2807 FIX: check_mail_loop: POP3 protocol wasn't working at all
+ * 2808 FIX: db2_connections: added missing connections performance data
Multisite:
* 2684 Added icons for downloading agent data / walks of hosts...
diff --git a/checks/db2_connections b/checks/db2_connections
index b0b58c4..6b69922 100644
--- a/checks/db2_connections
+++ b/checks/db2_connections
@@ -48,12 +48,13 @@ def check_db2_connections(item, params, parsed):
warn, crit = params["levels_total"]
connections = int(data["connections"])
+ state = 0
if connections >= crit:
- yield 2, "Connections: %s" % connections, [("connections",
connections)]
+ state = 2
elif connections >= warn:
- yield 1, "Connections: %s" % connections, [("connections",
connections)]
- else:
- yield 0, "Connections: %s" % connections, [("connections",
connections)]
+ state = 1
+ yield state, "Connections: %s" % connections, [("connections",
connections, warn, crit)]
+
yield 0, "Port: %s" % data["port"]
if "latency" in data: