<div>Hi,</div><div><br></div>I'm facing the following issue with executing an exec plugin that is a perl script. The script is quite bare bones and just prints out a PUTVAL. An identical shell script ends up creating the RRD but the same with a perl script does not work:<div>
<br></div><div>To illustrate the problem, here is some setup information:</div><div><br></div><div>types.db:</div><div>------------</div><div>svc failures:COUNTER:0:9223372036854775807</div><div><br></div>
<div><br></div><div>The following setup does not work when using a perl exec plugin:</div><div><br></div><div> collectd.conf:</div><div> -------------------</div><div><div> LoadPlugin exec</div><div> <Plugin exec></div>
<div> Exec "foo" "/usr/local/bin/<a href="http://collectd_test.pl">collectd_test.pl</a>"</div><div> </Plugin></div><div><br></div><div> <a href="http://collectd_test.pl">collectd_test.pl</a>:</div>
<div> ------------------------------------------</div><div><br></div><div> #! /usr/bin/perl</div><div><br></div><div> while (1) {</div><div> print 'PUTVAL sometest/exec-magicpl/svc-service interval=60 N:40' . "\n";</div>
<div> sleep 60</div><div> }</div><div><br></div>Whereas, the following works when using a shell script:</div><div><br></div><div><div> collectd.conf:</div><div><div> -------------------</div><div> LoadPlugin exec</div>
<div> <Plugin exec></div><div> Exec "foo" "/usr/local/bin/collectd_test.sh"</div><div> </Plugin></div><div><br></div></div><div> collectd_test.sh</div><div> -----------------------</div>
<div><div> #! /bin/bash</div><div> while [ true ]; do</div><div> echo 'PUTVAL sometest/exec-magicshell/svc-service interval=60 N:40'</div><div> sleep 60</div><div> done</div></div><div><br></div>
<div>In the shell based setup, when collectd -C /etc/collectd/collectd.conf -f is run directly, I can see the "0 Success" message (I presume from the rrdtool plugin or perhaps the plain-text-protocol-interpreter?). Whereas, with the perl based plugin, the rrd does not get created.</div>
<div><br></div><div>The log does not have anything though the loglevel is in debug mode.</div><div><br></div><div>What am I doing wrong here and how can I get perl based plugins to work?</div><div><br></div><div>thanks,</div>
<div><br></div><div> -Suraj</div><div><br></div>
</div>