Page 1 of 1

check_http post illegal character

Posted: Tue Dec 19, 2017 1:02 pm
by blariv
hi,

I cannot seem to get past this. the check runs fine at the command line but not through the UI.

./check_http -H $HOSTADDRESS$ -t 300 -s "5a380ddc2e87e46003f86ee5" -f ok -u "/wapi/v1/account/login/" -S -p 443 -P "email=[email protected]&password=password"

I have tried adding a $USERx$ macro in the resources.cfg with the ampersand symbol with no luck.

Re: check_http post illegal character

Posted: Tue Dec 19, 2017 1:41 pm
by npolovenko
Hello, @blariv.

Can you show us how this command is defined in Nagios XI, and the error output when you run it? Also, I would like to take a look at the successful output as well(when you run it from the command line).

Re: check_http post illegal character

Posted: Tue Dec 19, 2017 1:56 pm
by blariv
output from command line
HTTP OK HTTP/1.1 200 OK - 0.530 second response time |time=0.530243s;;;0.000000 size=1319B;;;0


output from UI

$USER1$/check_http -H $HOSTADDRESS$ -t 300 -s "5a380ddc2e87e46003f86ee5" -f ok -u "/wapi/v1/account/login/" -S -p 443 -P "email=[email protected]&password=nonenone"

COMMAND: /usr/local/nagios/libexec/check_http -H na.mymonopoly.com -t 300 -s "5a380ddc2e87e46003f86ee5" -f ok -u "/wapi/v1/account/login/" -S -p 443 -P \"email=[email protected]

OUTPUT: HTTP WARNING: HTTP/1.1 400 Bad Request

Re: check_http post illegal character

Posted: Tue Dec 19, 2017 2:43 pm
by npolovenko
@blariv, Can you find this service check in XI web interface, and then click on Force Immediate Check. After that please send in your Nagios XI System Profile.
To send us your system profile. Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and upload it with your next post. Or if privacy is a concern you may upload this profile to a cloud storage of your choice and share a link with me in PM.

Re: check_http post illegal character

Posted: Tue Dec 19, 2017 2:57 pm
by blariv
well this is embarrassing. I was running the check with the test command option and it was failing. I went and looked at the actual check and it runs fine.....

sorry you can close this.

Re: check_http post illegal character

Posted: Tue Dec 19, 2017 3:04 pm
by npolovenko
@blariv, I'm glad you were able to resolve this. I'll close the thread.