#!/bin/sh # # Plugin to monitor MGE battery state. if [ "$1" = "config" ]; then echo 'host_name pulsar.crans.org' echo 'graph_category Batteries' echo 'graph_title Etat batteries' echo 'graph_vlabel charge (%)' echo 'pcent.label Charge' exit 0 fi cmd="snmpget -O vq -v1 -c public pulsar.adm.crans.org SNMPv2-SMI::enterprises.705.1." echo "pcent.value $(${cmd}5.2.0)"