Status Checker Documentation

Site Checker


The Site Checker area of the site allows you to add sites to be checked to see if they're operational or not. It works by pinging the requested site and analysing the returned response based on your criteria.

To access the Site Checker, you need User Roles of Admin or Site Checker Manager.

For each site that you add, you must fill out the URL field that will be pinged. You then must enter the type of response to check for. There are three main options:

  • HTTP Status Code
  • String
  • JSON Object

HTTP STATUS CODE

A working site should normally respond with a HTTP Status Code of 200. Some sites, like Google for instances, will redirect you to another page and give you a status code of 302 or 301. By selecting this option, you can ping any site and analyse the status code to see if the site is working or not.

You can enter the different HTTP Status Codes to check for in the HTTP Codes Accepted field.

STRING

By selecting the String type, you are given a field in which you can enter a specific piece of text to look for in the response of a site. If the string is found in the response, then the status is recognised as being operational. If the string isn't found, then it recognises it as failed. You can enter any string you like. Some pages, however, operate using AJAX and so on the first request of a page the string you're looking for may not exist.

This option is best used for mostly static sites where the text you're looking for generally stays the same.

JSON Object

The JSON option allows you to test for a specific JSON object and an element that is returned by a URL. This option obviously only works when the website you ping returns a valid JSON object. Once selected, you are given a field to enter the JSON Object's element to check for. You can also test the value of this element too.

An example:

If my site returns the JSON Object of:

[success => 1, site_name ="Google"]

You can check the success element exists by typing that into the JSON Element field.

If you want to test a specific value such as the site_name element, you can enter the specific value of Google into the Json Value field.

Checking The Sites with a CRON

Each site has an individual check option when you view it on the Site Checker page. This will ping the site once and check the status of the site.

If you want to be constantly checking the status of a site, you can setup a cron that will run every X amount of minutes and ping all your sites in your Site Checker. This method is better than pinging all the sites every time you check the frontpage of the client view as it reduces spam to these sites.

To setup the cron, you want to execute the cron/check page. If you have installed the Status Checker at http://www.example.com then your cron URL would be: http://www.example.com/cron/check

Some cron options are as follows:

5/* * * * * wget http://www.example.com/cron/check (Pings every 5 minutes)

30/* * * * * wget http://www.example.com/cron/check (Pings every 30 minutes)

0 * * * * wget http://www.example.com/cron/check (Pings once per day)