diff options
Diffstat (limited to 'overlays')
-rw-r--r-- | overlays/zte-prometheus-exporter/zte-prometheus-exporter.py | 4 |
1 files changed, 2 insertions, 2 deletions
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: | |||
163 | link_metrics['dsl_uptime_seconds']['metrics'] += [({"link": link_number}, int(self.attrs['DSLINTERFACE'][link]['Showtime_start']))] | 163 | link_metrics['dsl_uptime_seconds']['metrics'] += [({"link": link_number}, int(self.attrs['DSLINTERFACE'][link]['Showtime_start']))] |
164 | if link_metrics: | 164 | if link_metrics: |
165 | for metric_name in link_metrics: | 165 | for metric_name in link_metrics: |
166 | metrics += _format_prom_metrics('dsl_{metric_name}', link_metrics[metric_name]['type'], link_metrics[metric_name]['metrics']) | 166 | metrics += _format_prom_metrics(f'dsl_{metric_name}', link_metrics[metric_name]['type'], link_metrics[metric_name]['metrics']) |
167 | 167 | ||
168 | eth_metrics = dict() | 168 | eth_metrics = dict() |
169 | for link in self.attrs['ETH']: | 169 | for link in self.attrs['ETH']: |
@@ -178,7 +178,7 @@ class ZTEMetrics: | |||
178 | eth_metrics['sent_bytes']['metrics'] += [({"link": link_number}, int(self.attrs['ETH'][link]['BytesSent']))] | 178 | eth_metrics['sent_bytes']['metrics'] += [({"link": link_number}, int(self.attrs['ETH'][link]['BytesSent']))] |
179 | if eth_metrics: | 179 | if eth_metrics: |
180 | for metric_name in eth_metrics: | 180 | for metric_name in eth_metrics: |
181 | metrics += _format_prom_metrics('eth_{metric_name}', eth_metrics[metric_name]['type'], eth_metrics[metric_name]['metrics']) | 181 | metrics += _format_prom_metrics(f'eth_{metric_name}', eth_metrics[metric_name]['type'], eth_metrics[metric_name]['metrics']) |
182 | 182 | ||
183 | return metrics.encode('utf-8') | 183 | return metrics.encode('utf-8') |
184 | 184 | ||