Module: check_mk
Branch: master
Commit: 877c754cd6b88c5e61537aca9d62b81eea1bbbe7
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=877c754cd6b88c…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Mar 25 11:14:10 2014 +0100
services.summary: WERK 566: improved backward compatibility
---
checks/services | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/checks/services b/checks/services
index 5fa1f4e..bdf5012 100644
--- a/checks/services
+++ b/checks/services
@@ -251,7 +251,13 @@ def check_services_summary(item, params, info):
num_blacklist = 0
num_auto = 0
for line in info:
- startstop, auto = line[2].split("/")
+ # newer agents also send start type as part of state,
+ # e.g. running/auto
+ if '/' in line[2]:
+ startstop, auto = line[2].split('/')
+ else:
+ startstop = line[2]
+ auto = "unknown"
srv_name = line[1]
if auto == "auto":
num_auto += 1