I've often used http://uptime.netcraft.com/ to do quick checks, and IIRC they have a sister site that deals with free uptime reporting - emailing you if your site goes down.
I've not explored the options fully, but at my old company we used to have a service that performed a GET on a page on a remote web server and parsed the output, and if it didn't return what was expected, an error email was sent out to the admin.
Basically, you'd have a php file on the server. This file would return TWO lines:
web:ok
mysql:[ok|down]
- The web line would ALWAYS return "ok", as the website is reached - if the web server is down, nothing is returned as the page cannot be retreived.
- The mysql line would return "ok" if a simple connect could be performed on the database, or "down" if the connection could not be made.
You could then parse the output to email if there's no response.
The checker could either by an app you run on your local machine, or another remote server - you can't put it on the server you want to check for uptime - if it's down, it can't tell you!
The intervals you check at is completely your call, but bear in mind if you're also doing the mysql check, you shouldn't set it too high as it's not nice to have all those connections opened and closed.... when i did it, it was on a private dedicated server for the client, so the issue of sharing wasn't there.
Hope this helps, and i'm interested in other people's opinions on this :)
Cheers
Karl
web design, development, seo, hosting by DigitalVibe