Module: check_mk
Branch: master
Commit: 45a22914bb7f2c136c3955df0ae743d448fbf23d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=45a22914bb7f2c…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Thu Jun 30 13:36:37 2016 +0200
skype: perfometer for mobile checks, reliably use a combined graph for mobile check and
updated a default level
---
checks/skype | 7 ++++++-
web/plugins/metrics/check_mk.py | 16 +++++++++++++---
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/checks/skype b/checks/skype
index 7144968..a98df85 100644
--- a/checks/skype
+++ b/checks/skype
@@ -49,7 +49,7 @@ factory_settings['skype_defaultlevels'] = {
'allocation_latency': {"upper": (5000, 10000)},
'timedout_incoming_messages': {"upper": (2, 4)},
- 'holding_time_incoming': {"upper": (1.0, 2.0)},
+ 'holding_time_incoming': {"upper": (6.0, 12.0)},
'flow_controlled_connections': {"upper": (1, 2)},
'outgoing_queue_delay': {"upper": (2.0, 4.0)},
'timedout_sends': {"upper": (0.01, 0.02)},
@@ -554,6 +554,11 @@ def check_skype_mobile(item, params, parsed):
perfdata = [perfdata]
yield status, "%s: %s" % (name, infotext), perfdata
+ else:
+ # add a perfcounter with 0 sessions for all missing devices so we can
+ # still properly build a combined graph for active sessions
+ yield 0, None, [("active_sessions_%s" % name.lower(), 0)]
+
yield wmi_yield_raw_counter(parsed["LS:WEB - Throttling and
Authentication"], item,
"WEB - Total Requests In Processing",
label=" requested",
diff --git a/web/plugins/metrics/check_mk.py b/web/plugins/metrics/check_mk.py
index 2570e0a..65ca01e 100644
--- a/web/plugins/metrics/check_mk.py
+++ b/web/plugins/metrics/check_mk.py
@@ -3396,7 +3396,8 @@ metric_info["failed_inbound_streams"] = {
skype_mobile_devices = [("android", "Android", "33/a"),
("iphone", "iPhone", "42/a"),
- ("ipad", "iPad", "45/a")]
+ ("ipad", "iPad", "45/a"),
+ ("mac", "Mac", "23/a")]
for device, name, color in skype_mobile_devices:
metric_info["active_sessions_%s" % device] = {
@@ -3515,6 +3516,7 @@ metric_info["dns_nxdomain"] = {
"color" : "34/a",
}
+
#.
# .--Checks--------------------------------------------------------------.
# | ____ _ _ |
@@ -5434,6 +5436,14 @@ perfometer_info.append({
"exponent" : 2,
})
+perfometer_info.append({
+ "type" : "linear",
+ "segments" : ["active_sessions_%s" % device
+ for device, name, color in skype_mobile_devices],
+ # there is no limit and no way to determine the max so far for
+ # all segments
+})
+
#.
# .--Graphs--------------------------------------------------------------.
@@ -6972,8 +6982,8 @@ graph_info.append({
graph_info.append({
"title" : _("Active Sessions"),
- "metrics" : [("active_sessions_%s" % device, "line")
- for device, name, color in skype_mobile_devices[::-1]]
+ "metrics" : [("active_sessions_%s" % device, idx == 0 and
"area" or "stack")
+ for idx, (device, name, color) in
enumerate(skype_mobile_devices[::-1])]
})
graph_info.append({