Pingdom is a great company that focuses on your server’s health and I’ve been using them.
Then I found this excellent PHP script that Jon Stacey wrote on his blog.
pingdom-core.php
This is my core services check. It makes sure that web services and MySQL are operational. Simply configure the script with the username and password of a MySQL database. If the script cannot make a connection to the database server, then a ‘MYSQL DOWN’ status will be returned to Pingdom. Of course, if the script doesn’t respond at all, then the web service is down and Pingdom will report a down status.
pingdom-server.php
This script is intended to be an early warning system. It will raise the alarm if something looks out of the ordinary so that I can be prepared for a possible service failure. The following server vitals are checked: swap usage, hard drive usage, and cpu usage. If any one of these goes beyond the preset thresholds, a down status will be returned to Pingdom.
You might be thinking that checks like these could be done with a monitoring script on the server without using Pingdom at all, and there is merit to that argument. However, if you run out of memory and your system comes crashing to a halt, that probably means that services like email, which you would have used to alert yourself to the problem, would no longer be working. By performing these checks remotely, you can sleep a little easier. Plus, Pingdom will generate nifty looking graphs, and I like graphs.
pingdom.php –Added on 12/4/2009–
This script is a combination of pingdom-core.php and pingdom-server.php if you’re using the free acount
You can check his website for all the updates at http://jonsview.com/how-i-use-pingdoms-http-custom-feature.