Skip to content

Simple server monitoring with servermonitor.py

The problem with most server monitoring systems is they run from inside of your network, as such if there is a major outage past office hours where their monitor server is not capable of sending an alert email out (be it the mail server is down, or internet) you may not get the notification at the time of the outage.  

There are ideal solutions to this such as signing up for a paging service so your servers have some kind of Out-Of-Band alerting or paid external monitoring but for very small shops that may not have the extra equipment or funds to install such hardware or pay for a service and the situation of having an externaly facing server go down is still a big deal I offer this script.

It’s purpose is to use one of the many free online shell accounts to provide you with additonal external monitoring to you already existing internal system for no cost.  It would also work great for all the home server folks out there that may have one box hosting there domain and want a simple monitor to know if there site, internet, or mail service has stopped working.

Here is an example of the status page the script generates script running at on of my free shells http://black.kracknet.net/~stickystyle/servermonitor

So here is v 0.1 of my script whose goal is to rely on nothing standard built-in python modules, and keep everything in one file.  It has an MIT license so everyone should be able to use it without worry of “GPL contamination”, also if you do use it, drop me a comment let me know how it works for you, that may inspire me to put some more work into it :-)  (patches are ALWAYS welcome)

servermonitor.py

 

TODO: Need to add a function to update the hash on ConnectAndVerify, right now you need to delete the service and re-add it if your banner or web page changes.

Post a Comment

Your email is never published nor shared. Required fields are marked *