[Nagiosplug-devel] Missing character in plugin output

Ferenc Wagner wferi at niif.hu
Tue Jan 17 08:14:47 CET 2012

Mark Clayton <clayton256 at gmail.com> writes:

>     HDTEMP=$(/user/sbin/hddtemp $DRIVE | awk '{ print $4}' | awk -F '°' '{ print $1}')
> root at little-harbor:/home/mark# /usr/lib/nagios/plugins/check_hddtemp -d /dev/sda
> (/dev/sda)=36 C.
> But Firefox and Safari show:
>  Disk Temperature<http://little-harbor.local/cgi-bin/nagios3/extinfo.cgi?type=2&host=localhost&service=Disk+Temperature>
> OK 2012-01-16 13:14:550d 4h 8m 22s 1/4(/dev/sda)= C.

/usr/sbin/hddtemp probably requires elevated privileges, which it has
when run from a root shell, but not when run by Nagios.  You'll probably
have to configure passwordless sudo from the nagios user to root or disk
for this command.

More information about the Devel mailing list