[collectd] Help with exec plugin

Florian Forster octo at verplant.org
Sat Aug 16 19:25:50 CEST 2008


Hi Daniel,

On Wed, Aug 06, 2008 at 08:40:40PM +0800, Daniel Rowe wrote:
> > > The output from this script is:
> > > 
> > > fileserver/exec-smart/temperature-3ware_0 interval=60 N:33
> > > fileserver/exec-smart/temperature-3ware_1 interval=60 N:34
> > > fileserver/exec-smart/temperature-3ware_2 interval=60 N:34
> > > fileserver/exec-smart/temperature-3ware_3 interval=60 N:33

> I have changed my script to output:
> 
> PUTVAL fileserver/exec-smart/temperature-3ware_0 interval=60 N:34
> PUTVAL fileserver/exec-smart/temperature-3ware_1 interval=60 N:35
> PUTVAL fileserver/exec-smart/temperature-3ware_2 interval=60 N:35
> PUTVAL fileserver/exec-smart/temperature-3ware_3 interval=60 N:34

I've written a small test script that simply outputs those strings and
they work for me.

> > > My exec part of the sensors collectd.conf file:
> > > 
> > > <Plugin exec>
> > >         Exec "sensors:sensors" "/usr/lib64/collectd/exec-smartctl"
> > > </Plugin>

Are you using the file included in contrib/? That script uses sudo to
re-gain root privileges. Did you try to run that script like this:?
  # sudo -u sensors /usr/lib64/collectd/exec-smartctl
If `sudo' is not set up correctly it might ask for a password or simply
deny access, which will lead to invalid output. Running the script as
root works, of course..

Regards,
-octo
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20080816/09b046a6/attachment.pgp 


More information about the collectd mailing list