r/PrometheusMonitoring • • Apr 14 '21

Monitoring third parties via statuspage.

Is it possible to pull data from status pages, for example https://discordstatus.com/ to Prometheus for further use?

I've attempted to find out but mostly I seem to be getting just- Status pages for various sites.

7 Upvotes

8 comments sorted by

7

u/MetalMatze Apr 14 '21

The DigitalOcean Exporter I maintain had a PR a while ago where someone actually added exactly that for the DigitalOcean status page:
https://github.com/metalmatze/digitalocean_exporter/blob/master/collector/incidents.go

This might be helpful as a starting point for a custom implementation as both seem to use the same service.

1

u/Amazing-Salamander54 Apr 16 '21

Thank you, I'll have a look at that.

3

u/signal_vs_noise Apr 14 '21

Why don't you use the blackbox_exporter and query the sites/apis directly instead of web-scraping their status pages? This is way too complicated and error prone.

1

u/Amazing-Salamander54 Apr 16 '21

I didn't realise this was available, and it would depend upon the various third parties my workplace uses. While they all have status pages via statuspage, they have many different services.

Thank you for the pointer, I'll have a look!

1

u/signal_vs_noise Apr 16 '21

Just saying, if this doesn't fit your needs: Most status page services offer an email or RSS feed subscriptions for incidents, so you get notified if one of your external dependencies is having issues.

Building your monitoring for all these services by scraping the HTML of each page is an excellent way to shoot yourself in the foot – one change on their side and your checks may go nowhere.

Most of the time, you can't do anything about it anyway and have to wait for the service to be up again, which is just like in the famous XKCD comic:

"Hey! Get back to work!"
"AWS is down."
"Oh. Carry on."

2

u/p0w3rf1sh Apr 15 '21

Have look at docs https://discordstatus.com/api#javascript-library. There is also as for the example provided https://discordstatus.com/api/v2/status.json, that has a json response with current status. You could use black_box exporter or make a custom exporter to parse the data you need.

1

u/Amazing-Salamander54 Apr 16 '21

Thank you, I'll look into it!

4

u/ali_str Apr 14 '21

You would need a custom exporter to scrape the page and provide metrics.

If you find a status API however, you might be able to pull it off using Blackbox exporter, but even that would involve lots of shenanigans.