Website monitoring with a backflip
2011/09/02 2 Comments
A standard website monitoring check will fail when the page isn’t returned at all or the web server reports a page missing. What happens when your site is running but there is a problem with dynamic content, like a feed is missing or a list of recent posts is empty?
In those cases the page might be “working” from the web server’s point of view (and so not reported as a 404 or 500 error), but not displaying what you want. You don’t want your visitors to see messages like “Error establishing a database connection” or “0 articles found“.
NodePing HTTP Content check tests if particular text shows up on a given webpage. Use the setting ‘Contains‘ to be alerted when specific text does NOT appear on a page. But in this case, we want to receive an alert when our error messages DO appear on the page. Use the ‘Does not contain‘ setting and the error message text as the search term to be notified when that happens.
For example, if you had an article list that was dynamic, so you never knew exactly what was going to show up there but you know something is wrong if the text ‘0 articles found‘ appears. Maybe the database is offline or you haven’t written anything recently enough. You’ll want to receive an alert.
Simply configure a HTTP Content check for the page and switch the text setting to ‘Does not contain‘ and add ‘0 articles found‘ to the text area. This will check the webpage and as long as it does NOT contain the words ‘0 articles found‘, the check will pass. If that text ever shows up, the check will fail and you’ll receive an alert, as expected.
There’s a thousand other uses for the HTTP Content check. Get creative and make sure you’re alerted when errors happen.