As with most people with a website/s on the Internet, it is desired to know when it has gone offline. I had previously set up accounts with Montastic and Pingdom to accomplish this task as both offered basic plans for free.
However it quickly became obvious that the limitations imposed would mean another service, either as a replacement or to accompany these would have to be found. For this, I found PHP Server Monitor.
I initially only had an account with Montastic, whose slogan is “The free website monitoring service that doesn’t suck“, which I was lead to by a pre-2010 article on website monitoring services (They’ve been around for a while). Their free account provides an automated check every 30 minutes to see if up to 3x of your websites are up with the option to check if a word or phrase is present on your sites main page.
Should you want more frequent checking, then paid plans are available. Of note, is that Montastic only have polling servers within the US, which means that if your website is not hosted within the US, then the check isn’t just that your website is up, but also that there are no greater issues plaguing International Internet links. Any delays may result in the check failing and you receiving an email, regardless of the actual status of your site.
For a website/s of low importance where it doesn’t matter if your site is down for a few hours, then the free plan with Montastic does the job.
I was then referred to Pingdom by a colleague, who’ve recently been acquired by SolarWinds which indicates their reputation as a monitoring service, and found this to provide a better free offering than Montastic, with 1 minute checking and a selection of graphical reports available for the monitoring of 1x website. Pingdom’s other advantage is that they have polling servers around the world to mitigate issues with International links affecting the statistics for your website monitoring, unfortunately, this didn’t extend to an Australian server which is where the websites I’m monitoring are located.
Pingdom includes options to wait for certain number of failed checks in a row prior to notifying you which is handy if you are monitoring a website that is flaky or slow. Given the lack of an Australian polling server, the latency statistics were always higher that what an average website user would experience, but could still be used to indicate issues with website slowness.
Also of note, for those people unfortunate enough to have to use Internet Explorer 9, Pingdom’s interface has definitely not been designed to accommodate you.
Following the acquisition of Pingdom by SolarWinds, how long they continue offering a free plan level remains to be seen.
For the monitoring of a single website on a regular basis with reports your boss would be impressed by, then Pingdom is for you.
Personally, my requirements were:
- Multiple website monitoring
- Frequent polling of websites
- Wait for X failed polls before alerting
- Australian based polling server
- Email notifications
- Free (or close to it)
After doing a bit of looking around the Internet, nothing free really jumped out as being suitable. Luckily, I have access to a Web Server which opens up the possibility of hosting my own monitoring service. A bit of Googling and some time later, I was looking into PHP Server Monitor.
PHP Server Monitor
PHP Server Monitor is an Open Source tool released for free under the GNU GPLv3 license, which permits use by anybody for free and the ability modify the tool for your own purposes (as long as you reference the source).
With PHP Server Monitor, and your own web server to host it upon, you can configure it to provide all of the requirements outlined above with the added ability to configure it so that different people can be alerted when different websites go down.
The only caveat with this option is that it isn’t as simple to get up and running as it is with an existing web based solution, but where’s the fun in not trying!
PHP Server Monitor – Installation Instructions
How to get PHP Server Monitor up and running (at least in my case):
- Check your web hosting supports the requirements:
- PHP 5.37+
- PHP PDO mysql driver
- I assumed it should, so proceeded to download the installation ZIP file from the PHP Server Monitor website
- Upload the ZIP file to your webspace and unzip the file into a suitable folder. You may find that it unzips into a subfolder of your intended folder, just use the CPanel File Manager (With hidden files enabled) to move the files into the appropriate folder.
- Setup a new MySQL database and MySQL user for this site.
- Open your web browser and navigate to domain.com/phpservermonitor/install.php
- In my case, I was greeted with a blank page. Great, check index.php and same deal. Solution was to add the following to my php.ini file:
- NOTE: Should you have any difficulties, you can add the following to the end of your config.php file before the > This is how I determined that I needed the items above added to my php.ini file
- Now, the install.php should work – In my case I had added the database settings already to config.php and so the installer jumped straight to the dependency checking and table creation section.
- You should now be able to access the site and configure your servers.
- Remember, to follow the instructions for setting up the cron job as this is what actually does the polling of your sites. The cron job task for entry into CPanel (after selecting your job frequency) is:
- You should now be set up and running
- You need to go to the Users section, Edit a User and ‘assign’ the relevants sites/servers to a User otherwise they will NOT be emailed if that server goes down. This includes the default Administrator user!
- If the times displayed on the site keep changing to several hours incorrect (Say they keep changing to the number of hours off of GMT that you are, then you need to add the following to the BEGINNING of your php.ini file (Obviously choose the correct Country/City from here)
date.timezone = "Australia/Perth"
Once PHP Server Monitor is up and running, it appears to do the job well. The only issue is that it is only as reliable as the Web Hosting provider you install it upon. Without checking, I would suspect that if the server you are running PHP Server Monitor upon went down, your graphs / statistics would not show any status changes for the duration. I.e. If the site you was monitoring was up, but went down and came back up whilst your monitoring server was down, you wouldn’t be alerted and wouldn’t have it shown on the graphs.
PHP Server Monitor will fulfill my requirements nicely, but I might keep my Pingdom account to monitor the server that I have installed PHP Server Monitor upon to assist in explaining why a monitored site might not have been noticed by PHP Server Monitor.