Check if site is up and running
Posted: Thu Aug 02, 2007 7:24 am
Ok so here is the problem. The other week my host ran an automatic update as they often do on our server. Well somehow the update updated the php.ini file and removed an extension that we needed to be loaded at all times. All that was required to fix it was add in the extension=thingy.so but since nobody at my office looks at our site over the weekend we had no idea it went down so basically we lost a weekends worth of business and thats never good. Since our host does not keep records of everything that was changed or even when updates are run (silly, huh?) they wouldn't take responsibility.
So what I want to do is setup a cron job to check to make sure the site is still up and running and if not fire out text messages and emails to me and my boss. Now I originally thought about an md5 of some page and check every hour if the md5 of the index page is the same as it should be. This would work but the problem is that we have dynamic content on the site which would make the md5 change even though the site is running normally. Another option I though about was just stripping out the dynamic content and get the md5 of the (mostly) static content. This would make sense but then I don't know for sure if all parts of the website are running smoothly (such as the forums) since its content is dynamic.
So does anyone have any better suggestions?
So what I want to do is setup a cron job to check to make sure the site is still up and running and if not fire out text messages and emails to me and my boss. Now I originally thought about an md5 of some page and check every hour if the md5 of the index page is the same as it should be. This would work but the problem is that we have dynamic content on the site which would make the md5 change even though the site is running normally. Another option I though about was just stripping out the dynamic content and get the md5 of the (mostly) static content. This would make sense but then I don't know for sure if all parts of the website are running smoothly (such as the forums) since its content is dynamic.
So does anyone have any better suggestions?