Nagios check_http for test string NEVER fails, ever!

I am trying to make Nagios tell me is a text string on a page exists and show a fault if it doesn't.  It never fails even if I put in a string that doesn't exist on the site.  I am doing something wrong.

Here's the check command:

  # 'check_http_string' command definition
define command{
    command_name    check_http_string
    command_line    $USER1$/check_http -H $ARG1$ -s $ARG2$

I invoke this like so:
check_command                check_http!-H "" -s "Welcome to the pants party"

I can't get the darn thing to fail!  Needless to say the quote after the -s doesn't exist on the site.  (Yes, I'm sure!)

From a console session it works perfectly when entered like this:

./check_http -H -s "mitigate behavioral risk"

any change to the text string and it fails as it should.  I am doing something wrong but I don't know what that could be.

Help please before I pull out whats left of my hair... it wouldn't take long.


Who is Participating?
check_command                check_http!-H "" -s "Welcome to the pants party"

should be

check_command                check_http_string!!'Welcome to the pants party"
freymishAuthor Commented:
Thanks!  All I can say for myself is... Doh!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.