restic-exporter icon indicating copy to clipboard operation
restic-exporter copied to clipboard

The exporter can fail unexpectedly if is queried before collecting information the first time

Open martonivan opened this issue 11 months ago • 0 comments

2024-03-25 09:59:06 INFO It could take a while if the repository is remote. 2024-03-25 09:59:59 ERROR Unable to collect metrics from Restic. Error: Error executing restic snapshot command. Exit code: -9 Traceback (most recent call last): File "/restic-exporter.py", line 226, in prometheus_client.core.REGISTRY.register(collector) File "/usr/local/lib/python3.11/site-packages/prometheus_client/registry.py", line 40, in register names = self._get_names(collector) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/prometheus_client/registry.py", line 80, in _get_names for metric in desc_func(): File "/restic-exporter.py", line 66, in collect check_success.add_metric([], self.metrics["check_success"]) ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^ KeyError: 'check_success'

martonivan avatar Mar 25 '24 10:03 martonivan