mge_intensite 569 Bytes
Newer Older
1 2 3 4 5 6 7 8
#!/bin/sh
#
# Plugin to monitor MGE battery state.

if [ "$1" = "config" ]; then
        echo 'host_name pulsar.crans.org'
	echo 'graph_category B4'
	echo 'graph_args --lower-limit 0'
9
	echo 'graph_title Intensite'
10
	echo 'graph_vlabel I (A)'
Xavier Lagorce's avatar
Xavier Lagorce committed
11
	echo 'input.label Entrée'
12 13 14 15 16 17 18 19
	echo 'input.min 0'
	echo 'output.label Sortie'
	echo 'output.min 0'
	exit 0
fi

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

20
input=$(${cmd}6.2.1.6.1.0)
21
output=$(${cmd}7.2.1.5.1)
22

23
echo "input.value $input"
24
echo "output.value $(($output/10)).$(($output%10))"