mirror of
https://github.com/KevinMidboe/mktxp-no-cli.git
synced 2025-10-29 17:50:23 +00:00
chore: drops label "last_seen" again
This commit is contained in:
@@ -25,7 +25,7 @@ class DHCPCollector(BaseCollector):
|
|||||||
if not router_entry.config_entry.dhcp:
|
if not router_entry.config_entry.dhcp:
|
||||||
return
|
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)
|
dhcp_lease_records = DHCPMetricsDataSource.metric_records(router_entry, metric_labels = dhcp_lease_labels)
|
||||||
if dhcp_lease_records:
|
if dhcp_lease_records:
|
||||||
# calculate number of leases per DHCP server
|
# calculate number of leases per DHCP server
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class DHCPMetricsDataSource:
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def metric_records(router_entry, *, metric_labels = None, add_router_id = True, dhcp_cache = True, translate = True, bound = False):
|
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:
|
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:
|
if dhcp_cache and router_entry.dhcp_records:
|
||||||
return router_entry.dhcp_records
|
return router_entry.dhcp_records
|
||||||
|
|||||||
Reference in New Issue
Block a user