To check out the source code or add the bot to a discord server check out the bot on github
Currently there is no way to get notified if mirror goes down and to find out if it is down you have to manually check. This is bad because In the event of an outage maintainers might not know its down for several hours.
Every Minute the Down Detector does the following:
If any of the http requests or the ping does not respond It sends a Discord Message that Mirror is down. It also sends a message when all services are back up.
We can't host it in our server room because then if our server room loses power the down detector will also go down and wont detect that Mirror went down. Colo is theoretically a good place to host it because I think it has backup generators however it currently routes all its public traffic through mirror. Currently I have it hosted on a linode cloud server that I own that hasn't gone down in over 200 days and im willing to host it there till colo is able to host it.
I made the bot in c++ using the D++ Discord api library. documentation github The bot has two threads each with its own bot object.
The bot has three slash commands