foxure.com
>>
MRTG Howtos
>>Disc temperature monitoring

Disc temperature monitoring

monitor disk temperature. Needs hddtemp running as deamon and netcat. You will need to change the mawk print variable untill you get the right value

/usr/local/bin/disc.sh

#!/bin/sh

sda=`netcat localhost 7634 | mawk -F "|" '{ print $14 }'`

echo "0"
echo $sda

/etc/mrtg.conf

Title[localsdatemp]: Temperature of sda on Nojja
PageTop[localsdatemp]: <H1>Temperature</H1>
Target[localsdatemp]: `/usr/local/bin/disc.sh`
MaxBytes[localsdatemp]: 52
Options[localsdatemp]: growright,unknaszero,nopercent,gauge,noinfo
LegendI[localsdatemp]:
LegendO[localsdatemp]: Temperature
YLegend[localsdatemp]: Celcius
ShortLegend[localsdatemp]: °C
Unscaled[localsdatemp]: ymwd
XSize[localsdatemp]: 600
YSize[localsdatemp]: 150

Result:

mrtg pic