lekpamartin / uptimerobot_exporter

Expose uptimerobot.com metrics for prometheus and visualize it in Grafana
Apache License 2.0
45 stars 22 forks source link

Fix bug when response_times is empty #10

Closed lululombard closed 3 years ago

lululombard commented 3 years ago

Hello,

Recently UptimeRobot rolled out a change and if you monitor a 404 page you won't get any response_times:

image

Therefore, the exporter was throwing this error:

image

This PR fixes it by appending uptimerobot_response_time(...) only for services that actually have response times.

image

I hope this is helpful, and thank you for this project! :)