summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--overlays/zte-prometheus-exporter/zte-prometheus-exporter.py4
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 67f13716..a0e1f23c 100644
--- a/overlays/zte-prometheus-exporter/zte-prometheus-exporter.py
+++ b/overlays/zte-prometheus-exporter/zte-prometheus-exporter.py
@@ -172,10 +172,10 @@ class ZTEMetrics:
172 172
173 if 'received_bytes' not in eth_metrics: 173 if 'received_bytes' not in eth_metrics:
174 eth_metrics['received_bytes'] = {'type': 'counter', 'metrics': []} 174 eth_metrics['received_bytes'] = {'type': 'counter', 'metrics': []}
175 eth_metrics['received_bytes']['metrics'] += [({"link": link_number}, int(self.attrs['ETH'][link]['BytesReceived']))] 175 eth_metrics['received_bytes']['metrics'] += [({"interface": link_number}, int(self.attrs['ETH'][link]['BytesReceived']))]
176 if 'sent_bytes' not in eth_metrics: 176 if 'sent_bytes' not in eth_metrics:
177 eth_metrics['sent_bytes'] = {'type': 'counter', 'metrics': []} 177 eth_metrics['sent_bytes'] = {'type': 'counter', 'metrics': []}
178 eth_metrics['sent_bytes']['metrics'] += [({"link": link_number}, int(self.attrs['ETH'][link]['BytesSent']))] 178 eth_metrics['sent_bytes']['metrics'] += [({"interface": 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(f'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'])