From 2783f9995b588d97f6c29e1a1e40f600a7dcd0b1 Mon Sep 17 00:00:00 2001 From: Albert Stefanov Date: Sat, 28 Oct 2023 08:36:34 +0300 Subject: [PATCH] Update Wi-Fi CheckMK Plugin 1. Fix channel time metric/plot 2. Replace metric units 3. Bump version --- .../wifi_intefaces/agent_based/wifi_interfaces.py | 4 ++-- tools/cmk-plugins/wifi_intefaces/build.py | 2 +- .../wifi_intefaces/web/plugins/metrics/wifi_interfaces.py | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/cmk-plugins/wifi_intefaces/agent_based/wifi_interfaces.py b/tools/cmk-plugins/wifi_intefaces/agent_based/wifi_interfaces.py index 8477d59..090ecc0 100644 --- a/tools/cmk-plugins/wifi_intefaces/agent_based/wifi_interfaces.py +++ b/tools/cmk-plugins/wifi_intefaces/agent_based/wifi_interfaces.py @@ -9,7 +9,7 @@ def check_wifi_status(item, section): for interface in section: if interface['name'] == item: usage = interface['delta_ch_time_busy'] / interface['delta_ch_time'] * 100 - yield Metric("delta_ch_time", interface['delta_ch_time_busy']) + yield Metric("delta_ch_time", interface['delta_ch_time']) yield Metric("delta_ch_time_busy", interface['delta_ch_time_busy']) yield Metric("channel_usage", usage, levels=(0,100)) yield Metric("noise_floor", interface['noise'], levels=(-120,0)) @@ -50,4 +50,4 @@ register.check_plugin( discovery_function=discover_wifi_status, sections=['wifi_interfaces'], check_function=check_wifi_status -) \ No newline at end of file +) diff --git a/tools/cmk-plugins/wifi_intefaces/build.py b/tools/cmk-plugins/wifi_intefaces/build.py index a23374e..56c9f67 100755 --- a/tools/cmk-plugins/wifi_intefaces/build.py +++ b/tools/cmk-plugins/wifi_intefaces/build.py @@ -7,7 +7,7 @@ mkp.dist({'author': 'Albert Stefanov ', 'name': 'wifi_interfaces', 'title': 'OpenWRT Wi-Fi Interfaces', 'download_url': 'https://github.com/openfest/openfest-network-2023', - 'version': '0.0.1', + 'version': '0.0.2', 'version.min_required': '2.0.0', }, path='.') diff --git a/tools/cmk-plugins/wifi_intefaces/web/plugins/metrics/wifi_interfaces.py b/tools/cmk-plugins/wifi_intefaces/web/plugins/metrics/wifi_interfaces.py index 9a81172..1454a22 100644 --- a/tools/cmk-plugins/wifi_intefaces/web/plugins/metrics/wifi_interfaces.py +++ b/tools/cmk-plugins/wifi_intefaces/web/plugins/metrics/wifi_interfaces.py @@ -20,19 +20,19 @@ metric_info["channel_usage"] = { metric_info["noise_floor"] = { "title": _("Noise Floor"), - "unit": "db", + "unit": "dbm", "color": "11/b", } metric_info["delta_ch_time"] = { "title": _("Channel Time delta"), - "unit": "", + "unit": "1/s", "color": "33/a", } metric_info["delta_ch_time_busy"] = { "title": _("Channel Busy Time delta"), - "unit": "", + "unit": "1/s", "color": "13/a", }