nagiosxi ccm test check command fix

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
danieloo
Posts: 27
Joined: Mon Feb 13, 2012 11:12 am

nagiosxi ccm test check command fix

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: nagiosxi ccm test check command fix

Post by scottwilkerson »

I am going to have the CCM developer take a look at this
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: nagiosxi ccm test check command fix

Post 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.
Locked