Check_http with specific character

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Koobal
Posts: 20
Joined: Mon Sep 03, 2012 7:26 am

Check_http with specific character

Post by Koobal »

Hi,
I see that there are other topics about that subject, but I have a particular case...
I had to check an URL with many specific character like ? , - , & ...
My problem is for the & ...
here is my URL :
http://xxxxxx.xx/yyyy.aspx?c=9dbb9b25-9 ... faf4fb&s=1

the problem is when i tried to configure with nagiosXI interface, the check cut my Url at the & like this :
http://xxxxxx.xx/yyyy.aspx?c=9dbb9b25-9 ... 4cb6faf4fb

Question is : How can I do ?
I tried simple quote, double quote around specifics chars, \ in front of chars...

here is my command :
$USER1$/check_http -H $HOSTADDRESS$ $ARG1$
-f ok -I 'XX.XX.XX.XX' -u '/yyyy.aspx?c=9dbb9b25-9e8f-489c-9d4a-ed4cb6faf4fb&s=1' -p 80

this is what NagiosXI returns me, when i make a test check command.
/usr/local/nagios/libexec/check_http -H http://xxxxxx.xx -f ok -I XX.XX.XX.XX -u \' /yyyy.aspx\?c=9dbb9b25-9e8f-489c-9d4a-ed4cb6faf4fb


Somebody can help me ?
Thanks,
Regards
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Check_http with specific character

Post by scottwilkerson »

Actually this command looks perfect however there are some commands the do not escape correctly with the "test command" feature...

You should be able to run this from the command line and get the expected results

Code: Select all

/usr/local/nagios/libexec/check_http -H XXX.XXX.XXX.XXX -f ok -I 'XXX.XXX.XXX.XXX' -u '/yyyy.aspx?c=9dbb9b25-9e8f-489c-9d4a-ed4cb6faf4fb&s=1' -p 80
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Koobal
Posts: 20
Joined: Mon Sep 03, 2012 7:26 am

Re: Check_http with specific character

Post by Koobal »

Hi, thanks for the answer.
Yes I had check in command line and it was ok. I thought that the test command check was the same command than the service check, so i didn't finalize my service. Shame on me.
Service check is ok.
thanks.
Locked