From 85068e747076b3092ee8140c77a0d2c8a936b951 Mon Sep 17 00:00:00 2001 From: Leon Morten Richter Date: Fri, 29 Mar 2024 11:07:47 +0100 Subject: [PATCH] chore: drops label "last_seen" again --- mktxp/collector/dhcp_collector.py | 2 +- mktxp/datasource/dhcp_ds.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mktxp/collector/dhcp_collector.py b/mktxp/collector/dhcp_collector.py index f7d48e1..9be4e37 100644 --- a/mktxp/collector/dhcp_collector.py +++ b/mktxp/collector/dhcp_collector.py @@ -25,7 +25,7 @@ class DHCPCollector(BaseCollector): if not router_entry.config_entry.dhcp: return - dhcp_lease_labels = ['active_address', 'address', 'mac_address', 'host_name', 'comment', 'server', 'expires_after', 'last_seen', 'client_id', 'active_mac_address'] + dhcp_lease_labels = ['active_address', 'address', 'mac_address', 'host_name', 'comment', 'server', 'expires_after', 'client_id', 'active_mac_address'] dhcp_lease_records = DHCPMetricsDataSource.metric_records(router_entry, metric_labels = dhcp_lease_labels) if dhcp_lease_records: # calculate number of leases per DHCP server diff --git a/mktxp/datasource/dhcp_ds.py b/mktxp/datasource/dhcp_ds.py index 5473dd5..bf5887e 100644 --- a/mktxp/datasource/dhcp_ds.py +++ b/mktxp/datasource/dhcp_ds.py @@ -22,7 +22,7 @@ class DHCPMetricsDataSource: @staticmethod def metric_records(router_entry, *, metric_labels = None, add_router_id = True, dhcp_cache = True, translate = True, bound = False): if metric_labels is None or dhcp_cache: - metric_labels = ['host_name', 'comment', 'active_address', 'address', 'mac_address', 'server', 'expires_after', 'last_seen', 'client_id', 'active_mac_address'] + metric_labels = ['host_name', 'comment', 'active_address', 'address', 'mac_address', 'server', 'expires_after', 'client_id', 'active_mac_address'] if dhcp_cache and router_entry.dhcp_records: return router_entry.dhcp_records