Module: check_mk
Branch: master
Commit: b10e37130b681f933a34a11a52055089c4840ec1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b10e37130b681f…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Mon Nov 10 16:12:48 2014 +0100
domino_info: check now handles undefined domain correctly
---
checks/domino_info | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/checks/domino_info b/checks/domino_info
index ed89b9e..4d36bb9 100644
--- a/checks/domino_info
+++ b/checks/domino_info
@@ -47,6 +47,10 @@ def inventory_domino_info(info):
def check_domino_info(_no_item, _no_params, info):
serverstate, domain, name, release = info
+ if len(domain) > 0:
+ maildomain = domain[0][0]
+ else:
+ maildomain = "-"
if int(serverstate[0][0]) > 4:
state = 1
infotext = "Server is %s" % ( domino_info_states[serverstate[0][0]] )
@@ -56,7 +60,7 @@ def check_domino_info(_no_item, _no_params, info):
else:
state = 0
infotext = "Server is %s. Domain: %s, Name: %s, %s" \
- % ( domino_info_states[serverstate[0][0]], domain[0][0], name[0][0],
release[0][0] )
+ % ( domino_info_states[serverstate[0][0]], maildomain, name[0][0],
release[0][0] )
yield state, infotext
check_info['domino_info'] = {