Update Wi-Fi CheckMK Plugin
1. Fix channel time metric/plot 2. Replace metric units 3. Bump version
This commit is contained in:
parent
b1b8585709
commit
2783f9995b
|
@ -9,7 +9,7 @@ def check_wifi_status(item, section):
|
||||||
for interface in section:
|
for interface in section:
|
||||||
if interface['name'] == item:
|
if interface['name'] == item:
|
||||||
usage = interface['delta_ch_time_busy'] / interface['delta_ch_time'] * 100
|
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("delta_ch_time_busy", interface['delta_ch_time_busy'])
|
||||||
yield Metric("channel_usage", usage, levels=(0,100))
|
yield Metric("channel_usage", usage, levels=(0,100))
|
||||||
yield Metric("noise_floor", interface['noise'], levels=(-120,0))
|
yield Metric("noise_floor", interface['noise'], levels=(-120,0))
|
||||||
|
@ -50,4 +50,4 @@ register.check_plugin(
|
||||||
discovery_function=discover_wifi_status,
|
discovery_function=discover_wifi_status,
|
||||||
sections=['wifi_interfaces'],
|
sections=['wifi_interfaces'],
|
||||||
check_function=check_wifi_status
|
check_function=check_wifi_status
|
||||||
)
|
)
|
||||||
|
|
|
@ -7,7 +7,7 @@ mkp.dist({'author': 'Albert Stefanov <aastefanov@outlook.com>',
|
||||||
'name': 'wifi_interfaces',
|
'name': 'wifi_interfaces',
|
||||||
'title': 'OpenWRT Wi-Fi Interfaces',
|
'title': 'OpenWRT Wi-Fi Interfaces',
|
||||||
'download_url': 'https://github.com/openfest/openfest-network-2023',
|
'download_url': 'https://github.com/openfest/openfest-network-2023',
|
||||||
'version': '0.0.1',
|
'version': '0.0.2',
|
||||||
'version.min_required': '2.0.0',
|
'version.min_required': '2.0.0',
|
||||||
},
|
},
|
||||||
path='.')
|
path='.')
|
||||||
|
|
|
@ -20,19 +20,19 @@ metric_info["channel_usage"] = {
|
||||||
|
|
||||||
metric_info["noise_floor"] = {
|
metric_info["noise_floor"] = {
|
||||||
"title": _("Noise Floor"),
|
"title": _("Noise Floor"),
|
||||||
"unit": "db",
|
"unit": "dbm",
|
||||||
"color": "11/b",
|
"color": "11/b",
|
||||||
}
|
}
|
||||||
|
|
||||||
metric_info["delta_ch_time"] = {
|
metric_info["delta_ch_time"] = {
|
||||||
"title": _("Channel Time delta"),
|
"title": _("Channel Time delta"),
|
||||||
"unit": "",
|
"unit": "1/s",
|
||||||
"color": "33/a",
|
"color": "33/a",
|
||||||
}
|
}
|
||||||
|
|
||||||
metric_info["delta_ch_time_busy"] = {
|
metric_info["delta_ch_time_busy"] = {
|
||||||
"title": _("Channel Busy Time delta"),
|
"title": _("Channel Busy Time delta"),
|
||||||
"unit": "",
|
"unit": "1/s",
|
||||||
"color": "13/a",
|
"color": "13/a",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue