antonputra / tutorials

DevOps Tutorials
https://youtube.com/antonputra
MIT License
3.19k stars 2.5k forks source link

fix(prometheus-nginx-exporter): prevent exporter crash on incorrect log format #304

Closed hexley21 closed 1 month ago

hexley21 commented 1 month ago

In case in access.log file there is a line that does not match the regex, the app won't panic

So before adding match to a result map, it will check if length does not equal to 0