Module: check_mk
Branch: master
Commit: 3b386fabe19908591dbac6362b5e5ba1fb22e92b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3b386fabe19908…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Dec 12 14:02:53 2012 +0100
mysql_connections: Handling missing data correctly
---
checks/mysql | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/checks/mysql b/checks/mysql
index 4fe957b..025a0c4 100644
--- a/checks/mysql
+++ b/checks/mysql
@@ -171,6 +171,9 @@ def inventory_mysql_connections(info):
def check_mysql_connections(item, params, info):
values = parse_mysql(info)
+ if 'Max_used_connections' not in values:
+ return (3 'UNKNOWN - Connection information are missing')
+
# The maximum number of connections that have been in use simultaneously
# since the server started.
conn = float(values['Max_used_connections'])