How to use check_http -u with a parameterized url

I am using Nagios check_http -u like this…

check _command check_http!-u /start/test/index.jsp -s "test string" -t 60and it works perfect !

When i use it this way…

check _command check_http!-u /start/test/index.jsp?tt=main/index.asp&dd=test -s "test string" -t 60What i get is…
(Return code of 127 is out of bounds - plugin may be missing)

Any suggestions?!?

You could maybe try escaping the ?

…or the &

…or both

HTH

/S

Thanks for the reply Strides, this is exactly my problem… How to escape the & !
I tried your suggestion but didn’t work!
Also tried & , %26 didn’t work either !

Any other suggestions ?!?

hmm… I expect you’ve tried \& as well then… ?

Other suggestion, (and to be honest this probably won’t work but its all I can think of so early in the a.m…) define $USERx$ as the url in resource.cfg, like

then

… I dunno, it’s a bit of a silly and non-scalable solution but it might get around your problem…

Else it might be a case of writing and external script and using wget and grepping your test-string…

StridesYOU ARE THE MAN !

I tried the \& and it worked !!!

Thanks dude !!!
:smiley:

[size=150]Thread SOLVED ![/size]

lol thanks, happy to help :slight_smile:

Good! thank you :slight_smile: