Using the watchdog
The watchdog system can be configured from the console shell menu. The watchdog maintains a list of checks for your machine which are performed every 5-10 minutes. These checks can do one of the following:
- Ping an IP address associated with your machine.
- Check for an ssh response from an IP address associated with your machine.
- Try to fetch a web page from a particular IP address and optionally check that it contains a given piece of text.
Each check as an action associated with it which can be one of two things:
- Send you an email
- Send you an SMS
The email address and SMS phone number are fixed in our contact database: you should make sure your details are kept up-to-date via the admin panel for these to work properly.
Checking for a ping response from an ip address.
This checks for basic network connectivity of an ip address that your machine should respond on.
Checking that SSH is still responding
This is often a more useful test than simply pinging your host to determine whether it is “up”, since the Linux kernel will respond to pings after crashing quite badly sometimes! For instance, machines struggling in an out of memory (OOM) condition, will often respond to pings, but will not reply to a ssh login attempt.
One disadvantage compared to the ping test is that you cannot use it if you’ve adjusted your ssh daemon to listen on a non-standard port – ie one other than port 22.
Making sure your web site is still working
If you’re developing a site for a client who is going to be very sensitive to down time, whatever the cause, it helps to check that a particular page will always fetch correctly. You should pick a page on the site which accesses databases or other external resources, and check for output that confirms that such external data has been read correctly.
A couple of things to note; firstly this is an http test so you can’t use it for pages behind a SSL certificate. Secondly, you must specify a full URL eg http://www.
“We recently suffered a hosting crisis and turned to Bytemark for help. The staff were cool, calm and collected throughout. They offered a very high level of customer service. and enabled us to switch over 85 domains and 100s of email addresses in a very short space of time.”