Module: check_mk
Branch: master
Commit: 7c7d5ca2d1d8464a8c107304a669092a988421b2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7c7d5ca2d1d846…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Aug 29 16:36:11 2014 +0200
docsis_downstream_channels: better output for Perf-O-Meter
---
web/plugins/perfometer/check_mk.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/web/plugins/perfometer/check_mk.py b/web/plugins/perfometer/check_mk.py
index 703eb2d..9f6f354 100644
--- a/web/plugins/perfometer/check_mk.py
+++ b/web/plugins/perfometer/check_mk.py
@@ -1156,7 +1156,7 @@ def perfometer_voltage(row, check_command, perf_data):
perfometers["check_mk-bintec_sensors.voltage"] = perfometer_voltage
-def perfometer_fec( row, check_command, perf_data ):
+def perfometer_fec(row, check_command, perf_data):
total = float(perf_data[3][1])
corrected = ( int(perf_data[1][1]) / total ) * 100
uncorrected = ( int(perf_data[2][1]) / total ) * 100
@@ -1170,8 +1170,8 @@ def perfometer_fec( row, check_command, perf_data ):
perfometers["check_mk-docsis_signal_quality"] = perfometer_fec
-def perfometer_mhz( row, check_command, perf_data ):
- mhz_current = int(perf_data[0][1])
- return str(mhz_current) + " Mhz", perfometer_logarithmic(mhz_current, 50,
2, "#da6")
+def perfometer_dbmv(row, check_command, perf_data):
+ dbmv = float(perf_data[0][1])
+ return "%.1f dBmV" % dbmv, perfometer_logarithmic(dbmv, 50, 2,
"#da6")
-perfometers["check_mk-docsis_channels_downstream"] = perfometer_mhz
+perfometers["check_mk-docsis_channels_downstream"] = perfometer_dbmv