0

I'm making a statuspage(statuspage.io) for my discord bot, and I want to record the downtime automatically with uptimerobot. But I have no idea how. Does a discord bot (written in python) use a specific port, which can be used to see if the bot is online? Or do I need to do this somehow with the discord API to check if the bot is online? I haven't found anything, except something with a discord bot hosted on glitch, but I don't host anything on that site, I host it myself.

Also how do I connect uptimerobot with statuspage?

NanderTGA
  • 5
  • 1
  • 6

1 Answers1

0

For uptime robot to work, you need a publicly facing webpage that it can request every 5 minutes.

Two options:

  1. Your discord bot needs to run in the cloud and run a http server at the same time

  2. Have your web server accept another request like example.com/keepalive to tell the server that the bot is still running.

Uptime robot would then query example.com/alive and you have to return 200 OK if the bot is online and 404 if offline.

NOTE: If you already have something like the 2nd approach running, you may as well just save the uptime info on your public server. I also recommend passing some authentication in headers or as a query (password, for example) if you use this to avoid people abusing it.

TCoded
  • 413
  • 4
  • 11
  • I run my discord bot and http server both on my raspberry pi, if I understand this correctly, I should only monitor or the raspberry pi is up by pinging the website, and put that on my statuspage, now I only need to figure out how to connect those 2 with each other. Thanks for the help. – NanderTGA Jun 11 '20 at 12:27