From 0c9e777f17d17d55693aa500ebb76a65987fde45 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 29 Dec 2021 21:24:49 +0100 Subject: zte-prometheus-exporter: ... --- overlays/zte-prometheus-exporter/zte-prometheus-exporter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'overlays/zte-prometheus-exporter') diff --git a/overlays/zte-prometheus-exporter/zte-prometheus-exporter.py b/overlays/zte-prometheus-exporter/zte-prometheus-exporter.py index 13ff5a85..67f13716 100644 --- a/overlays/zte-prometheus-exporter/zte-prometheus-exporter.py +++ b/overlays/zte-prometheus-exporter/zte-prometheus-exporter.py @@ -163,7 +163,7 @@ class ZTEMetrics: link_metrics['dsl_uptime_seconds']['metrics'] += [({"link": link_number}, int(self.attrs['DSLINTERFACE'][link]['Showtime_start']))] if link_metrics: for metric_name in link_metrics: - metrics += _format_prom_metrics('dsl_{metric_name}', link_metrics[metric_name]['type'], link_metrics[metric_name]['metrics']) + metrics += _format_prom_metrics(f'dsl_{metric_name}', link_metrics[metric_name]['type'], link_metrics[metric_name]['metrics']) eth_metrics = dict() for link in self.attrs['ETH']: @@ -178,7 +178,7 @@ class ZTEMetrics: eth_metrics['sent_bytes']['metrics'] += [({"link": link_number}, int(self.attrs['ETH'][link]['BytesSent']))] if eth_metrics: for metric_name in eth_metrics: - metrics += _format_prom_metrics('eth_{metric_name}', eth_metrics[metric_name]['type'], eth_metrics[metric_name]['metrics']) + metrics += _format_prom_metrics(f'eth_{metric_name}', eth_metrics[metric_name]['type'], eth_metrics[metric_name]['metrics']) return metrics.encode('utf-8') -- cgit v1.2.3