Module: check_mk
Branch: master
Commit: 07b4fc80d84e807cd26cb6248c207aeced68d9b1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=07b4fc80d84e80…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Tue May 24 15:40:13 2016 +0200
skype: fixed crash on missing optional tables
---
checks/skype | 42 +++++++++++++++++++++---------------------
1 file changed, 21 insertions(+), 21 deletions(-)
diff --git a/checks/skype b/checks/skype
index 375810c..55cf35a 100644
--- a/checks/skype
+++ b/checks/skype
@@ -123,23 +123,26 @@ def check_skype(item, params, parsed):
perfvar="asp_requests_rejected",
levels=params['asp_requests_rejected'])
- yield wmi_yield_raw_persec(parsed["LS:WEB - AdressBookFile Download"],
item,
- "WEB - Failed File Requests/Second",
- label=" failed file requests/sec",
- perfvar="failed_file_requests",
- levels=params['failed_file_requests'])
-
- yield wmi_yield_raw_counter(parsed["LS:JoinLauncher - Join Launcher Service
Failure"], item,
- "JOINLAUNCHER - Join failures",
- label=" join failures",
- perfvar="join_failures",
- levels=params['join_failures'])
-
- yield wmi_yield_raw_counter(parsed["LS:WEB - Auth Provider related calls"],
item,
- "Web - Failed validate cert calls to the cert auth
provider",
- label=" failed cert validations",
- perfvar="failed_validate_cert",
- levels=params['failed_validate_cert'])
+ if "LS:WEB - Address Book File Download" in parsed:
+ yield wmi_yield_raw_persec(parsed["LS:WEB - AdressBookFile Download"],
item,
+ "WEB - Failed File Requests/Second",
+ label=" failed file requests/sec",
+ perfvar="failed_file_requests",
+ levels=params['failed_file_requests'])
+
+ if "LS:JoinLauncher - Join Launcher Service Failure" in parsed:
+ yield wmi_yield_raw_counter(parsed["LS:JoinLauncher - Join Launcher Service
Failure"],
+ item, "JOINLAUNCHER - Join failures",
+ label=" join failures",
+ perfvar="join_failures",
+ levels=params['join_failures'])
+
+ if "LS:WEB - Auth Provider related calls" in parsed:
+ yield wmi_yield_raw_counter(parsed["LS:WEB - Auth Provider related
calls"], item,
+ "Web - Failed validate cert calls to the cert
auth provider",
+ label=" failed cert validations",
+ perfvar="failed_validate_cert",
+ levels=params['failed_validate_cert'])
check_info['skype'] = {
@@ -149,10 +152,7 @@ check_info['skype'] = {
"LS:WEB - Distribution List Expansion",
"LS:SIP - Protocol",
"LS:WEB - UCWA",
- "ASP.NET Apps v4.0.30319",
- "LS:WEB - Address Book File Download",
- "LS: JoinLauncher – Join Launcher Service Failure",
- "LS:WEB – Auth Provider related calls"
+ "ASP.NET Apps v4.0.30319"
]),
'check_function' : check_skype,
'parse_function' : lambda info: parse_wmi_table(info,
key="instance"),