Follow redirects for HTTP checks

We’re happy to announce a new optional feature for our HTTP checks – follow redirects.

Until today, NodePing website monitoring only supported the single HTTP request/response.  An often requested feature was the ability to follow HTTP redirect codes in the 300s and evaluate the check on the final page of the redirects.

redirect

We believe you should monitor everything, including your redirect pages. We recommend you create a separate check for the redirect and ensure the 301 or 302 status code and the header ‘Location’ is to the destination URL you expect and then create another check to monitor that destination URL. We still think this is a best practice for website monitoring and will help you pinpoint a failure more quickly should something happen to your redirect or destination URL.

We realize there’s a use case for monitoring HTTP responses that includes following redirects and we’re happy to include that option in our HTTP checks. The default behavior remains the same – that is we do not follow redirects but rather evaluate an HTTP status code in the 300 range as a successful response.

To activate this option in your HTTP check, set the “Redirects:” drop down to “Follow redirects” or, if you’re using the API, set a ‘follow’ parameter to true. Our probes will follow up to 4 redirects and per the RFC, will only redirect on HTTP GET requests.

For more information, please see our documentation on the supported HTTP checks:
HTTP – Simple website monitoring for 200-399 HTTP status codes
HTTP Content – Verify content exists (or doesn’t exist) in the returned HTML
HTTP Advanced – The swiss-army-knife of HTTP checks. Set request headers, verify response headers, send JSON, XML, or form data, use GET/POST/PUT/HEAD/DELETE/TRACE/CONNECT methods, verify content, and expected returned HTTP status codes. You can even monitor a 404 page.

 

When 200 Isn’t Enough

Website monitoring seems like a simple thing.  Most HTTP checks look for a response in the 200-399 range, 200 being the most common HTTP response meaning “Server responded correctly – here’s the resource you were looking for.”  But if you’re one of the millions of people or businesses that use Joomla, checking for 200 just isn’t enough.

Now don’t get me wrong, I like Joomla.  It’s a fine CMS and I’ve built many custom modules and plugins for it.  There are plenty of great websites running on it.  But you have to keep a close eye out for errors.

Today, one of our clients had an issue with the network storage on their server and the file system was quickly remounted in read-only mode.  This is expected and even prescribed behavior for mount point errors.  But MySQL, the database, didn’t like not being able to write to its tables and logs and quickly failed.  That, in turn, took the public website offline.  Joomla presented a big white page with the error message Database Error: Unable to connect to the database:Could not connect to MySQL.  The site was not working as expected… surely the website monitoring service would send an alert!  Nope.  The database access error was returned with an HTTP status of 200.  The web server was saying “Everything’s OK.”  No alert was sent from the basic HTTP check.  How embarrassing is it to get the news that your website is down on a call from a customer?

With NodePing, you can use our HTTP Content checks to make sure this doesn’t happen to your Joomla (or other CMS) site.  It works by simply searching for particular text within the returned HTML page.  If you add a check that searches for your copyright footer, it will fail as expected if the database is unavailable and the above error message was returned on the check.  You’ll receive your email or SMS notification that it’s down and can react quickly.  Conversely, if you know the exact error you want to avoid, you can run a negative content check so that it will alert you when the response of the check DOES contain the text ‘Database Error’.

With today’s complex web applications depending on many moving parts, it’s not enough to just check for a 200 response from a web server.  You have to dig deeper, and NodePing has just the shovel you need.