[collectd] Plugin Exec generate no data
Hi! On a Citrix XenServer runs collectd 4.10.3. The collectd data are send to an collectd server on another machine in the local net here. The values for the activate plugins interface, load, memory and swap are corretd send. But the also activated plugin Exec no. If i start the script on command line it generates this data: PUTVAL skyxen3/exec-ipmi/temperature-chasis interval=60 N:39 PUTVAL skyxen3/exec-ipmi/temperature-chasis interval=60 N:39 PUTVAL skyxen3/exec-ipmi/temperature-chasis interval=60 N:39 PUTVAL skyxen3/exec-ipmi/temperature-chasis interval=60 N:39 and so on... The script run not as root user! In the collectd log are no errors or another info about this. Here the part of the collectd.conf: Plugin exec Exec collectduser:collectduser /etc/collectd/collectd-ipmi.sh # NotificationExec user:group /path/to/exec /Plugin And this is the script: #!/bin/bash HOSTNAME=${COLLECTD_HOSTNAME:-`hostname -f`} INTERVAL=${COLLECTD_INTERVAL:-60} while sleep $INTERVAL do TEMP=$((sudo ipmitool sensor get 'System Temp'|grep Reading|cut -d -f 12) 2/dev/null); if [ $? -ne 0 ] then TEMP=U fi echo PUTVAL $HOSTNAME/exec-ipmi/temperature-chasis interval=$INTERVAL N:$TEMP done Please, what make i wrong? Why no data on the server side? Greetings... Frederic ___ collectd mailing list collectd@verplant.org http://mailman.verplant.org/listinfo/collectd
Re: [collectd] Plugin Exec generate no data
On Tue, Oct 22, 2013 at 04:12:18PM +0200, Frederic Daguenet wrote: On a Citrix XenServer runs collectd 4.10.3. The collectd data are send to an collectd server on another machine in the local net here. The values for the activate plugins interface, load, memory and swap are corretd send. But the also activated plugin Exec no. If i start the script on command line it generates this data: PUTVAL skyxen3/exec-ipmi/temperature-chasis interval=60 N:39 PUTVAL skyxen3/exec-ipmi/temperature-chasis interval=60 N:39 PUTVAL skyxen3/exec-ipmi/temperature-chasis interval=60 N:39 PUTVAL skyxen3/exec-ipmi/temperature-chasis interval=60 N:39 and so on... The script run not as root user! But what happens when you manually run the script as the user collectduser and default group collectduser? If there are permission problems (e.g. collectduser isn't listed in sudoers) running under that user, which is how collectd will run the plugin, then it will naturally have problems. Have you tried instrumenting your script with debug logging to see if it's called and what's going on? Dan ___ collectd mailing list collectd@verplant.org http://mailman.verplant.org/listinfo/collectd