#!/bin/sh # host=`echo -n $0 | sed 's/.*snmp_\(.*\)_soekris_temp/\1/'` if [ "$1" = "autoconf" ]; then echo yes exit 0 fi if [ "$1" = "config" ]; then echo "host_name ${host}" echo 'graph_title Temperature' echo 'graph_args --upper-limit 100 -l 0 ' echo 'graph_vlabel Celcius' echo 'graph_category sensors' echo 'graph_info This graph shows temperature in the system.' echo 'temp.label temp' echo 'temp.info Temperature readout from the motherboard sensor.' echo 'temp.draw LINE2' echo 'temp.max 100' echo 'temp.min 0' exit 0 fi echo -n "temp.value " temp=`/usr/local/bin/snmpwalk -Os -c public -v 1 ${host} 1.3.6.1.4.1.30155.2.1.2.1.5.3 | awk -F \" '{print $2}'` echo $temp