check_http post illegal character

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
blariv
Posts: 190
Joined: Wed Sep 26, 2012 11:55 am

check_http post illegal character

Post 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.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: check_http post illegal character

Post 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).
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
blariv
Posts: 190
Joined: Wed Sep 26, 2012 11:55 am

Re: check_http post illegal character

Post 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
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: check_http post illegal character

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
blariv
Posts: 190
Joined: Wed Sep 26, 2012 11:55 am

Re: check_http post illegal character

Post 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.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: check_http post illegal character

Post by npolovenko »

@blariv, I'm glad you were able to resolve this. I'll close the thread.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked