[collectd] Plugin Exec generate no data

Frederic Daguenet daguenet at skygate.de
Thu Oct 24 09:57:08 CEST 2013


Hello Dan,

> 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?

now i make a test with some debug informations. The line "echo ...."
exists twice. The second line give his output via ">" to a file. And
this file was written with date, when the daemon run.


and hello Pavel!

You wrote:
>  At first, I propose you to check if all commands called from your script has absolute paths.
>  At second, you can add some debug to your script, with output debug data into file.
>  Start from adding "env >> /path/to/debug/output/file", "date >>
> /path/to/debug/output/file" into your script.
>  Don`t forget to set correct permissions to that file.

The scrist looks now so:

#!/bin/bash

HOSTNAME="${COLLECTD_HOSTNAME:-`/bin/hostname -f`}"
INTERVAL="${COLLECTD_INTERVAL:-60}"

while sleep "$INTERVAL"
do
        TEMP=$((/usr/bin/sudo /usr/bin/ipmitool sensor get 'System Temp'|/bin/grep Reading|cut -d " " -f 12) 2>/dev/null);
        if [ $? -ne 0 ]
        then
                TEMP="U"
        fi
        /bin/echo "PUTVAL $HOSTNAME/exec-ipmi/temperature interval=$INTERVAL N:$TEMP"

done

But nothing change... no data at the server sided collectd.

Greetings...
Frederic





More information about the collectd mailing list