masaruhoshi / uptimerobot-prometheus-exporter

A Golang Prometheus exporter for UptimeRobot monitors.
MIT License
33 stars 13 forks source link

Fix Infinite Loop #29

Closed masaruhoshi closed 6 years ago

masaruhoshi commented 6 years ago

The API may end in an infinite loop when it does not return a valid response. This PR deals with when this happens.

uptimerobot-exporter    | time="2018-06-06T14:26:53Z" level=info msg="Response from UptimeRobot API%!(EXTRA *api.XMLMonitors=&{{{ pagination} 39650 50 103} []})" source="uptimerobot.go:128"
uptimerobot-exporter    | time="2018-06-06T14:26:53Z" level=info msg="ScrapeUptimeRobot scraped 103 monitors" source="uptimerobot.go:105"
uptimerobot-exporter    | time="2018-06-06T14:26:53Z" level=info msg="Response from UptimeRobot API%!(EXTRA *api.XMLMonitors=&{{{ pagination} 39750 50 103} []})" source="uptimerobot.go:128"
uptimerobot-exporter    | time="2018-06-06T14:26:53Z" level=info msg="ScrapeUptimeRobot scraped 103 monitors" source="uptimerobot.go:105"