Module: check_mk
Branch: master
Commit: 76efa9bc7ae38cdd6f1f7f4d7281c02bc1d43c9c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=76efa9bc7ae38c…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Sep 15 10:04:35 2016 +0200
mssql_blocked_sessions: Reporting no blocked sessions in case of empty section
---
checks/mssql_blocked_sessions | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/checks/mssql_blocked_sessions b/checks/mssql_blocked_sessions
index 224bfdc..e874081 100644
--- a/checks/mssql_blocked_sessions
+++ b/checks/mssql_blocked_sessions
@@ -30,15 +30,17 @@
# 119 232292187 LCK_M_U 75
# 76 221526672 LCK_M_U 115
+# TODO: Make this check aware of multiple instances! Don't handle the blocked
+# sessions independent of instances anymore. Use same service description
+# schema as "mssql_instance".
def inventory_mssql_blocked_sessions(info):
return [(None, None)]
def check_mssql_blocked_sessions(_no_item, params, info):
if not info:
- # Assume general connection problem to the database, which is reported
- # by the "X Instance" service and skip this check.
- raise MKCounterWrapped("Failed to connect to database")
+ yield 0, "No blocked sessions"
+ return
state = 2
if params: