mirror of
https://github.com/KevinMidboe/mktxp-no-cli.git
synced 2025-10-29 17:50:23 +00:00
connections stats collector / cmd output, remote dhcp resolver, fixes / optimizations
This commit is contained in:
@@ -14,7 +14,6 @@
|
||||
|
||||
from mktxp.flow.processor.output import BaseOutputProcessor
|
||||
from mktxp.collector.base_collector import BaseCollector
|
||||
from mktxp.datasource.dhcp_ds import DHCPMetricsDataSource
|
||||
from mktxp.datasource.wireless_ds import WirelessMetricsDataSource
|
||||
from mktxp.datasource.interface_ds import InterfaceMonitorMetricsDataSource
|
||||
|
||||
@@ -52,12 +51,8 @@ class WLANCollector(BaseCollector):
|
||||
registration_labels = ['interface', 'ssid', 'mac_address', 'tx_rate', 'rx_rate', 'uptime', 'bytes', 'signal_to_noise', 'tx_ccq', 'signal_strength', 'signal']
|
||||
registration_records = WirelessMetricsDataSource.metric_records(router_entry, metric_labels = registration_labels)
|
||||
if registration_records:
|
||||
dhcp_lease_labels = ['mac_address', 'address', 'host_name', 'comment']
|
||||
dhcp_entry = WirelessMetricsDataSource.dhcp_entry(router_entry)
|
||||
dhcp_lease_records = DHCPMetricsDataSource.metric_records(dhcp_entry, metric_labels = dhcp_lease_labels)
|
||||
|
||||
for registration_record in registration_records:
|
||||
BaseOutputProcessor.augment_record(router_entry, registration_record, dhcp_lease_records)
|
||||
BaseOutputProcessor.augment_record(router_entry, registration_record)
|
||||
|
||||
tx_byte_metrics = BaseCollector.counter_collector('wlan_clients_tx_bytes', 'Number of sent packet bytes', registration_records, 'tx_bytes', ['dhcp_name'])
|
||||
yield tx_byte_metrics
|
||||
|
||||
Reference in New Issue
Block a user