Hi,
Since upgrading to the latest Cacti & cactid I have found that some of my custom scripts seem to of broken, and it appears to be down to the way cactid is passing variables to my custom script.
My Data input method is using:
<path_cacti>/scripts/intstats.custom <host> <community> <dir> <bits> <ifname> <iftype>
I have added some logging to my script to see what variables it is being passed, and when I run cmd.php as the poller (or cactid on my old cacti server) I get:
$1 = host.domain
$2 = public
$3 = out
$4 = 64
$5 = port ethernet 1/3
$6 = 6
But when I run cactid my script logs the following variables are passed:
$1 = host.domain
$2 = public
$3 = out
$4 = 64
$5 = "port
$6 = ethernet
It seems my script is not getting the second quote around the variable and so interpreting this one variable as mutliple variables. I have tried using double quotes, single quotes and no quotes but I get the same issue each time with cactid.
With cmd.php my script gets the variables fine, but the poller runs out of time due to the number of hosts & checks.
How can I get this to work?
Many Thanks.
Cactid - passing script variable with a space
Moderators: Developers, Moderators
Who is online
Users browsing this forum: No registered users and 0 guests