Raspberry PI mrtg cpu temperature template

Решил в mrtg кроме трафа, мониторить еще и температуру процессора на малинке, все просто как 5 коп)
Создаем скриптик
# vim /home/pi/check_temp.sh |
вставляем следующее содержимое
tempread=`cat /sys/class/thermal/thermal_zone0/temp` |
temp=`echo "scale=2; $tempread / 1000" | bc` |
сохраняем, меняем права
# chmod 774 /home/pi/check_temp.sh |
теперь
добавляем
### CPU Temperature Raspberry |
TimeStrPos[localhost.cpu_temp]: RU |
Target[localhost.cpu_temp]: `/home/pi/check_temp.sh` |
Options[localhost.cpu_temp]: gauge,growright,nopercent,expscale,transparent |
Title[localhost.cpu_temp]: Raspberry Pi Server – CPU Temperature |
PageTop[localhost.cpu_temp]: |
<h1>Raspberry Pi Server – CPU Temperature</h1> |
MaxBytes[localhost.cpu_temp]: 125 |
Step[localhost.cpu_temp]: 60 |
Legend1[localhost.cpu_temp]: CPU Temperature Raspberry Pi Server |
LegendI[localhost.cpu_temp]: CPU Temperature |
LegendO[localhost.cpu_temp]: |
YLegend[localhost.cpu_temp]: Grad Celsius |
ShortLegend[localhost.cpu_temp]: Grad °C |
сохраняем и пересоздаем индексный файл, у меня на малине я поднял вместо апача nginx и в корне решил сделать mrtg графики
# indexmaker /etc/mrtg.cfg >/usr/share/nginx/www/index.html |
Через пять минут любуемся результатом:
09.06.2014 в 15:52
· Ссылка
Если у тебя ничего не установлено, попробуй так
# apt-get install mrtg snmp snmpd apache2 snmp-mibs-downloader bc
10.06.2014 в 13:06
· Ссылка
Стоит только апач и все.
09.06.2014 в 15:44
· Ссылка
А можно подробнее про mrtg и как впаять это чудо в апач??