Module: check_mk
Branch: master
Commit: a8954e5a7169112da1e99bf0dfd9e07afed178b2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a8954e5a716911…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Thu May 19 13:37:25 2016 +0200
skype.mobile: fixed a crash if the output didn't contain all expected instances
---
checks/skype | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/checks/skype b/checks/skype
index 6d79f6a..1f83e9b 100644
--- a/checks/skype
+++ b/checks/skype
@@ -427,15 +427,20 @@ def check_skype_mobile(item, params, parsed):
for instance, name in [("AndroidLync", "Android"),
("iPadLync", "iPad"),
- ("iPhoneLync", "iPhone")]:
+ ("iPhoneLync", "iPhone"),
+ ("LyncForMac", "Mac")]:
status, infotext, perfdata =\
wmi_yield_raw_counter(parsed["LS:WEB - UCWA"], instance,
"UCWA - Active Session Count",
label=" active",
perfvar="active_sessions")
- perfdata = list(perfdata[0])
- perfdata[0] += "_" + name.lower()
- yield status, "%s: %s" % (name, infotext), [perfdata]
+ if status != 3:
+ if perfdata:
+ perfdata = list(perfdata[0])
+ perfdata[0] += "_" + name.lower()
+ perfdata = [perfdata]
+
+ yield status, "%s: %s" % (name, infotext), perfdata
yield wmi_yield_raw_counter(parsed["LS:WEB - Throttling and
Authentication"], item,
"WEB - Total Requests In Processing",
label=" requested",