diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2021-12-29 21:26:40 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2021-12-29 21:26:40 +0100 |
commit | 80023979b3541bfb6881fe939dda0f9ed5a687b4 (patch) | |
tree | 4540ed60f6bec0be344724550f9aa33777b808b0 /overlays/zte-prometheus-exporter/zte-prometheus-exporter.py | |
parent | 0c9e777f17d17d55693aa500ebb76a65987fde45 (diff) | |
download | nixos-80023979b3541bfb6881fe939dda0f9ed5a687b4.tar nixos-80023979b3541bfb6881fe939dda0f9ed5a687b4.tar.gz nixos-80023979b3541bfb6881fe939dda0f9ed5a687b4.tar.bz2 nixos-80023979b3541bfb6881fe939dda0f9ed5a687b4.tar.xz nixos-80023979b3541bfb6881fe939dda0f9ed5a687b4.zip |
zte-prometheus-exporter: ...
Diffstat (limited to 'overlays/zte-prometheus-exporter/zte-prometheus-exporter.py')
-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 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']) |