| 2022-02-06 | Fix negative numbers error.•••This patch fixes the error:
Traceback (most recent call last):
File "/gnu/store/...-prometheus-tp-link-exporter-1.0.0/bin/.prometheus-tp-link-exporter-real", line 33, in <module>
sys.exit(load_entry_point('prometheus-tp-link-exporter==1.0.0', 'console_scripts', 'prometheus-tp-link-exporter')())
File "/gnu/store/...-prometheus-tp-link-exporter-1.0.0/lib/python3.9/site-packages/prometheus_tp_link_exporter/__main__.py", line 63, in main
process_node_network_transmit_bytes_total()
File "/gnu/store/...-prometheus-tp-link-exporter-1.0.0/lib/python3.9/site-packages/prometheus_tp_link_exporter/__main__.py", line 50, in process_node_network_transmit_bytes_total
node_network_transmit_bytes_total.labels(device=device["name"]).inc(
File "/gnu/store/...-python-prometheus-client-0.7.1/lib/python3.9/site-packages/prometheus_client/metrics.py", line 243, in inc
raise ValueError('Counters can only be incremented by non-negative amounts.')
ValueError: Counters can only be incremented by non-negative amounts.
Traceback (most recent call last):
File "/gnu/store/...-prometheus-tp-link-exporter-1.1.0/bin/.prometheus-tp-link-exporter-real", line 33, in <module>
sys.exit(load_entry_point('prometheus-tp-link-exporter==1.0.0', 'console_scripts', 'prometheus-tp-link-exporter')())
File "/gnu/store/...-prometheus-tp-link-exporter-1.1.0/lib/python3.9/site-packages/prometheus_tp_link_exporter/__main__.py", line 66, in main
process_node_network_receive_bytes_total()
File "/gnu/store/...-prometheus-tp-link-exporter-1.1.0/lib/python3.9/site-packages/prometheus_tp_link_exporter/__main__.py", line 36, in process_node_network_receive_bytes_total
node_network_receive_bytes_total.labels(device=device["name"]).inc(
File "/gnu/store/...-python-prometheus-client-0.7.1/lib/python3.9/site-packages/prometheus_client/metrics.py", line 243, in inc
raise ValueError('Counters can only be incremented by non-negative amounts.')
ValueError: Counters can only be incremented by non-negative amounts.
v1.1.1 | Oleg Pykhalov | 1 | -8/+16 |