#!/bin/sh

if [ "$1" = "config" ]; then
        echo 'host_name pulsar.crans.org'
	echo 'graph_category Environnement'
	echo 'graph_title Temperature 0B'
	echo 'graph_vlabel Température en (°C)'
	echo 'temp.label Température 0B'
	echo 'temp.warning 22'
	echo 'temp.critical 24'
	exit 0
fi

cmd="snmpget -O vq -v1 -c public pulsar.adm.crans.org SNMPv2-SMI::enterprises.705.1."

t=$(${cmd}8.1.0)
echo "temp.value $(($t/10)).$(($t%10))"
