Page 1 of 1

nagiosxi ccm test check command fix

Posted: Wed Nov 14, 2012 5:24 am
by danieloo
When testing a check command using the test button in ccm I found that there are characters being escaped.
when checking a soap server with the Argument -u "/api/customer?wsdl"
The ? gets replaced bij \?
I found this being done in: html/includes/components/ccm/command_test.php
bij the php command escapeshellcmd.

This test check wil return a 400 invalid request whilst the real nagios check will be executed correctly by nagioscore.
2 possible fixes:
- remove the escapeshellcmd
- remove the escaped characters in check_http

Re: nagiosxi ccm test check command fix

Posted: Wed Nov 14, 2012 5:19 pm
by scottwilkerson
I am going to have the CCM developer take a look at this

Re: nagiosxi ccm test check command fix

Posted: Thu Nov 15, 2012 10:14 am
by mguthrie
From doing some digging on this, it looks like the command may be able to work using escapeshellarg() instead of escapeshellcmd(). I'll update the functions calls for the next release.