I have a data query I wrote that's called through the script server. In the XML file I prepend a static string that has a space in it, therefore I quote it:
Code: Select all
<arg_prepend>|host_hostname| "Cisco H323"</arg_prepend>
When I set this up, my script stopped working when called from the script server. Some debugging showed that the "Cisco H323" is being changed to two arguments:
"Cisco
and
H323"
When called outside the script server, either from the command line or a verbose query from the device screen, the script works fine.
On full debugging:
Code: Select all
09/05/2008 01:10:24 PM - PHPSVR: Poller[0] DEBUG: INC: '/usr/share/cacti/scripts/ss_callmanager.php' FUNC: 'ss_callmanager' PARMS: 'X.X.80.17 "Cisco H323" get CallsInProgress X.X.80.22'
09/05/2008 01:10:24 PM - CACTID: Poller[0] Host[340] DS[11597] SS[0] SERVER: /usr/share/cacti/scripts/ss_callmanager.php ss_callmanager X.X.80.17 "Cisco H323" get CallsInProgress X.X.80.22, output: U
Code: Select all
X.X.80.17
"Cisco
H323"
get
CallsInProgress
If I hardcode the "Cisco H323" in my script and remove the prepended value, it works.
http://forums.cacti.net/viewtopic.php?t=27181 seems to be similar, but the string in question dynamic (enclosed in pipes)
Am I passing the string incorrectly? Is there a better way? Is this a bug?
Thanks
Sean