Module: check_mk
Branch: master
Commit: 78794b77f1dc71d1dff37abacdf9a9fc61e2e540
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=78794b77f1dc71…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Wed Oct 29 11:33:59 2014 +0100
Tuned veeam_client perfometer
---
web/plugins/perfometer/check_mk.py | 5 +++--
web/plugins/views/perfometer.py | 5 ++++-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/web/plugins/perfometer/check_mk.py b/web/plugins/perfometer/check_mk.py
index efaf698..c97aa5b 100644
--- a/web/plugins/perfometer/check_mk.py
+++ b/web/plugins/perfometer/check_mk.py
@@ -1177,10 +1177,11 @@ perfometers["check_mk-docsis_channels_upstream"] =
perfometer_docsis_snr
def perfometer_veeam_client(row, check_command, perf_data):
avgspeed_bytes = int(perf_data[4][1])
duration_secs = int(perf_data[3][1])
- h = perfometer_logarithmic_dual_independent(avgspeed_bytes, '#54b948',
10000000, 2, duration_secs, '#2098cb', 1000, 2)
+ h = perfometer_logarithmic_dual_independent(avgspeed_bytes, '#54b948',
10000000, 2, duration_secs, '#2098cb', 500, 2)
avgspeed = bytes_human_readable(avgspeed_bytes)
- duration = age_human_readable(duration_secs)
+ # Return Value always as minutes
+ duration = age_human_readable(duration_secs, True)
return "%s/s %s" % (avgspeed, duration), h
diff --git a/web/plugins/views/perfometer.py b/web/plugins/views/perfometer.py
index 47f179e..5ada1f2 100644
--- a/web/plugins/views/perfometer.py
+++ b/web/plugins/views/perfometer.py
@@ -132,7 +132,10 @@ def number_human_readable(n, precision=1, unit="B"):
else:
return (f + "%s") % (n, unit)
-def age_human_readable(secs):
+def age_human_readable(secs, min_only=False):
+ if min_only:
+ mins = secs / 60.0
+ return "%.1f min" % mins
if secs < 240:
return "%d sec" % secs
mins = secs / 60