String matching isn't working



I need to actually check the availability of the url, “” and also check for the string, ‘LIVE’.

When i checked using, “…/libexec/check_http -H -u /pdc/user_info/site_monitor.jsp -s “LIVE” -f follow -t 120”, i got the following output:

HTTP WARNING - maximum redirection depth 15 exceeded - … onitor.jsp

Please help to fix this issue.


Try to put the url in double quotes when defining the check_command:
-u “/pdc/user_info/site_monitor.jsp”


Now I get an ok status…
[nagios@iserv163 etc]$ …/libexec/check_http -H -u /pdc/user_info/site_monitor.jsp -s LIVE -t 10
HTTP OK - HTTP/1.1 301 Moved Permanently - 0.004 second response time |time=0.004448s;;;0.000000 size=576B;;;0**

However for the other website, i still see an error. I have checked in the browser that the site is up with the word “LIVE” in the body. But checking from nagios returns an error… :frowning:

[nagios@iserv163 etc]$ …/libexec/check_http -H -u /pdc/user_info/site_monitor.jsp -s LIVE -t 10
HTTP WARNING: HTTP/1.1 404 Not Found
[nagios@iserv163 etc]$ …/libexec/check_http -H -u “/pdc/user_info/site_monitor.jsp” -s LIVE -t 10
HTTP WARNING: HTTP/1.1 404 Not Found

Any thoughts?


Hm, from my location the specified url works OK.

./check_http -H -u /pdc/user_info/site_monitor.jsp -s LIVE -t 10 HTTP OK HTTP/1.1 200 OK - 0.304 second response time |time=0.304071s;;;0.000000 size=644B;;;0

with or without double quotes.
Are you sure you can reach the website from your Nagios machine, maybe some access list or firewall issues…
…or the check_http plugin? Which version of nagios-plugins are you using?


How can I check the version of the nagios plugin?


I forgot to mention in my earlier post that I am checking for url from nagios dmz.