expires_after cardinality, bug fixes

This commit is contained in:
Arseniy Kuznetsov
2022-09-17 09:43:46 +01:00
parent 7aeb02ac71
commit d0456eab19
10 changed files with 45 additions and 25 deletions

View File

@@ -13,6 +13,7 @@
from mktxp.datasource.base_ds import BaseDSProcessor
from mktxp.utils.utils import parse_mkt_uptime
class DHCPMetricsDataSource:
@@ -31,7 +32,7 @@ class DHCPMetricsDataSource:
if 'host_name' in metric_labels:
translation_table['host_name'] = lambda c: c if c else ''
if 'expires_after' in metric_labels:
translation_table['expires_after'] = lambda c: c if c else ''
translation_table['expires_after'] = lambda c: parse_mkt_uptime(c)
if 'active_address' in metric_labels:
translation_table['active_address'] = lambda c: c if c else ''