Wednesday, February 10, 2010 8:46 AM
I'd rather not mention the name of my hosting provider, but I'm definitely dissatisfied with their service. In the beginning of February I started monitoring website uptime.
The idea behind the tool I've written is simple. The program runs as a service on a dedicated machine and periodically queries a known resource on the website. The query intervals are adjustable. Currently I've specified them as follows:
- every 30 minutes if the resource has been successfully accessed;
- every 5 minutes if the resource cannot be accessed.
This is actually the main reason I decided to write my own tool – you only get hourly monitoring from free services. If you want more frequent pings, you have to pay. And I'm just too old school to pay for this.
If the resource on the website cannot be reached, the tool tries to determine if the server on which it is running, has no connection. To do so, it queries a so called trusted URL. Finally, the site is considered down only if the trusted URL can be reached.
Another concept I put into the tool is analysis. The program automatically displays downtime intervals: start time, end time and duration. Given the sum of these intervals, I calculate total uptime, total downtime, and most importantly, relative uptime. I can perform this kind of analysis for various periods.
After a couple of weeks of monitoring I guess, the hosting provider is somewhat cheating with numbers. They promise 99.9% uptime. My tool shows a more truthful figure.
It makes sense to monitor your website uptime because you need to know what you're paying for. If anybody is interested, I'll probably publish the source code some time later.