Does your community have a tendency to not tell you something is offline until it's already been down for hours? Does stuff tend to always break while you're away? Or do you just not want to pay for Pingdom and then pay even more for it's SMS alerts? Maybe only I have those problems, but here's the thing I made anyway.
ServerTracker is a simple Java program that allows you to track the uptime of multiple servers and services. When a server or service goes down, you'll receive an SMS alert via the Twilio service. For this guide, we'll be using a Twilio trial account, which is completely free. You can send sms alerts to multiple people (such as your sysadmins) and can send alerts to certain people depending on which server goes offline.
To run ServerTracker it will need to be run on a server somewhere. If you want to simply use it to check for crashed Minecraft servers, you can just run it on the server that runs the Minecraft servers. If you're using it to monitor your web servers, Minecraft servers and uptime of a physical or virtual machine, I'd recommend running it on a server somewhere that has a low chance of going offline.
This is only something I recently created and is still being worked on and being improved. Currently it doesn't have much error handling in regards to the configuration being done incorrectly. I don't really plan on changing this either. Ensure that your config.xml file resembles that of the default.
Configuration and usage:
Configuration and usage information is available on it's read me file: https://github.com/Zachoz/ServerTracker/blob/master/README.md
I would include it here as well but that will always have the most up to date guide.
To send the SMS alerts you will need a Twilio account. While Twilio costs money, you can use a free trial. For a free trial you get $30 of credit, if you live in the US, UK or pretty much any other country that's not Australia, it costs around $0.0075 per SMS sent, so around 4000 messages. Twilio's pricing is available here: https://www.twilio.com/sms/pricing
Sign up for an account at https://twilio.com.
During the signup process you will need to verify your account by having a SMS sent to your phone and entering the verification code. Once that's done, select the phone number they assign you, and you're done with the signup!
Once to your account site you will see the following information required for ServerTracker's configuration. Clicking on "Configure your number" will give you the number in the plain +1000000000 like form which gets put into the config.
Note: You must verify all phone numbers on your Twilio trial account to send messages to them. Additionally all messages will start with "Sent from your Twilio trial account", however I think this is a small inconvenience for the benefits it provides.
- It is important to bare in mind that the number you're provided with is almost always a US phone number. Meaning if you live outside of the US, this will be counted as an international text message. In Australia I know we only get charged to send text messages, not receives them (At least on our major carriers like Telstra, Optus and Vodafone), other countries and their carriers may have different policies and may charge you to receive these international text messages. Check with your carrier if you're unsure.
- I'm not responsible for any fees you may incur from this. If you run out of credit from your Twilio trial, you won't be able to send the SMS messages but won't charge you unless you upgrade your account.
- Also just going to put it out there, if you do manage to run out of Twilio credit you must have really bad uptime.
Special thanks to jamietech for making his Minecraft server query API.
Track multiple servers/services uptime and receive an SMS when they go down via Twilio
- Http page scraping support and accuracy improvements Jan 19, 2015