Any monitoring for a server should be done remotely - otherwise when your production system goes down you'll never know. It sounds like you are looking for both monitoring and trending (pretty graphs/etc are always nice). Two options I would say would be good choices for you:
If you haven't gotten into server monitoring before, I would sign up for a service like pingdom.
Word to the wise: especially if you are only monitoring one server now, I would highly recommend using a service like this, monitoring is something that's easy to Do Wrong if you've never done it before.
That being said, if you end up with two servers, or you have the budget for a cheap VPS somewhere, you could alternatively setup nagios + cacti or zenoss to monitor your production system.
If you are looking to proactively 'fix' problems, for linux, you have at least three options as I see it which would also serve your original objective if you can't do external monitoring:
Monit will help you monitor services on a local machine: http://mmonit.com/monit/
God is an extendable framework in ruby which does similar things to monit, but advertises increased flexibility: http://god.rubyforge.org/
Some kind of scripted system like what you describe which will track your uptime and react as necessary - I would avoid this unless you have a good reason not to use a pre-packaged solution.