netflow#vi getxxx.sh
#! /bin/sh
url="http://123.456.789.000/B/crrntdata/cdata.txt"
wget=/usr/bin/wget
awg=/usr/bin/awk
$wget -q -O - $url | awk 'BEGIN{FS="="} /cHumidity=/ || /cTemperature1/ {print $2}'
echo "TEMP"
echo "-"
netflow#vi mrtgtempe.cfg
WorkDir: /var/www/mrtg/tempe
PageTop[^]: <h1>Stats for</h1>
#TimeZone[_]: Taiwan
Options[^]: gauge growright
kilo[_]: 1024
XSize[_]: 400
Language: big5
EnableIPv6: no
Target[TR-72W]:`/etc/mrtg/temperature/getxxx.sh `
MaxBytes[TR-72W]: 100
MaxBytes2[TR-72W]: 100
Title[TR-72W]: West_Thermometer&Hygrometer
Options[TR-72W]: absolute, gauge
PageTop[TR-72W]:<H1>West_Thermometer&Hygrometer</H1>
AbsMax[TR-72W]: 100
Ylegend[TR-72W]: dig. / %
ShortLegend[TR-72W]: dig or %
#RouterUptime[TR-72W]:public@123.456.789.00
Unscaled[TR-72W]: dmwy
LegendI[TR-72W]: dig.
LegendO[TR-72W]: %
Legend1[TR-72W]: Thermometer
Legend2[TR-72W]: Hygrometer
netflow# env LANG=C /usr/bin/mrtg /etc/mrtg/temperature/mrtgtempe.cfg
netflow# crontab -e
*/5 * * * * env LANG=C /usr/bin/mrtg /etc/mrtg/temperature/mrtgtempe.cfg