fail2ban-geo-exporter icon indicating copy to clipboard operation
fail2ban-geo-exporter copied to clipboard

KeyError: 'city'

Open dimitrimestdag opened this issue 3 years ago • 1 comments

Hello, What is this error? The exporter was working fine and suddenly he made this mistake, not possible to find out why

` Traceback (most recent call last):

File "./fail2ban-exporter.py", line 127, in <module>

REGISTRY.register(F2bCollector(conf))

File "/usr/local/lib/python3.8/site-packages/prometheus_client/registry.py", line 24, in register

names = self._get_names(collector)

File "/usr/local/lib/python3.8/site-packages/prometheus_client/registry.py", line 64, in _get_names

for metric in desc_func():

File "./fail2ban-exporter.py", line 80, in collect

yield self.expose_grouped()

File "./fail2ban-exporter.py", line 107, in expose_grouped

location_key = tuple([ entry[x] for x in self.extra_labels ])

File "./fail2ban-exporter.py", line 107, in <listcomp>

location_key = tuple([ entry[x] for x in self.extra_labels ])

KeyError: 'city'

`

Thanks for your help

Dimo

dimitrimestdag avatar Aug 06 '21 10:08 dimitrimestdag