[collectd] collectd exec and perl
Suraj
suraj at sunson.in
Thu Oct 28 07:39:39 CEST 2010
Hi,
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:
To illustrate the problem, here is some setup information:
types.db:
------------
svc failures:COUNTER:0:9223372036854775807
The following setup does not work when using a perl exec plugin:
collectd.conf:
-------------------
LoadPlugin exec
<Plugin exec>
Exec "foo" "/usr/local/bin/collectd_test.pl"
</Plugin>
collectd_test.pl:
------------------------------------------
#! /usr/bin/perl
while (1) {
print 'PUTVAL sometest/exec-magicpl/svc-service interval=60 N:40' .
"\n";
sleep 60
}
Whereas, the following works when using a shell script:
collectd.conf:
-------------------
LoadPlugin exec
<Plugin exec>
Exec "foo" "/usr/local/bin/collectd_test.sh"
</Plugin>
collectd_test.sh
-----------------------
#! /bin/bash
while [ true ]; do
echo 'PUTVAL sometest/exec-magicshell/svc-service interval=60
N:40'
sleep 60
done
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.
The log does not have anything though the loglevel is in debug mode.
What am I doing wrong here and how can I get perl based plugins to work?
thanks,
-Suraj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20101028/35b48c55/attachment.htm>
More information about the collectd
mailing list