Nagios check_http

Just a quick and dirty post regarding the Nagios check_http plugin. found a little quirk that kept me scratching my head for some time. I added a new site to my monitoring system and ended up getting a result of

HTTP OK – HTTP/1.1 302 Moved Temporarily – 0.174 second response time |time=0.17

turned out the web hosting provider was redirecting you to the actual content but the check_http plugin does not follow the redirect by default. I corrected the issue by adding “-f follow” switch to the command. This tells the check_http plugin to follow any redirects it encounters.

HTTP OK HTTP/1.1 200 OK – 1.010 second response time |time=1.009625s;;;0.000000 size=12304B;;;0

so your entire command should look like the following:

define service{
use remote-service
host_name [hostname]
service_description HTTP
check_command check_http!-H [domanname] -f follow -s “[String to look for]”

The final -s switch is optional but it will help notify you of any unauthorized changes made to the site your monitoring (eg. Hacking attempt).

No tips yet.
Be the first to tip!

Like this post? Tip with bitcoin!


If you enjoyed reading this post, please consider tipping me using Bitcoin. Each post gets its own unique Bitcoin address so by tipping you're not only making my continued efforts possible but telling me what you liked.

5 thoughts on “Nagios check_http

  1. You’re linking to this page on Nagios Exchange for the check_http plugin, yet there’s no download link anywhere to be found.

    • theres nothing really to download for this plugin, the check_http plugin is included in your default install, I’m just showing a configuration option I needed to set up to follow redirects.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.