1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-08-06 14:15:05 +00:00

Put order in SNMP plugins by moving all of them together in snmp/

This makes it easier to find what should be used for SNMP monitoring.
This commit is contained in:
Diego Elio Pettenò 2012-08-06 21:33:00 -07:00
parent 2fc9c2400b
commit 7da1b039c2
45 changed files with 0 additions and 0 deletions

36
plugins/snmp/snmp__ups_battery Executable file
View file

@ -0,0 +1,36 @@
#!/bin/sh
#
# Plugin to monitor battery from UPS APC 9619
# 2009/04/10 12:27:02 radar AT aol DOT pl
#
# ln -s /usr/share/munin/plugins/snmp__ups_battery /etc/munin/plugins/snmp_UPS.IP_ups_battery
#
# Magic markers (optional - only used by munin-config and some installation scripts):
#%# family=contrib
UPSHOST=$(basename $0 | awk -F'_|_' '{print $2}')
if [ "$1" = "config" ]; then
UPSMODEL=$(snmpwalk -v 2c -c public $UPSHOST .1.3.6.1.4.1.318.1.1.1.1.1.1.0 | awk -F'"|"' '{print $2}')
echo "graph_title $UPSMODEL - Battery"
echo "graph_args --base 1000 -l 0 -u 100"
echo "graph_vlabel %"
echo "graph_scale no"
echo "graph_category sensors"
echo "graph_info This graph shows the battery capacity/load read from $UPSMODEL"
echo "batterycapacity.label Battery Capacity"
echo "batterycapacity.type GAUGE"
echo "batterycapacity.draw LINE3"
echo "batterycapacity.info Battery Capacity"
echo "batterycapacity.colour ff0000"
echo "batteryload.label Battery Load"
echo "batteryload.type GAUGE"
echo "batteryload.draw AREA"
echo "batteryload.info Battery Load"
exit 0
fi
echo -n "batterycapacity.value "
snmpwalk -v 2c -c public $UPSHOST .1.3.6.1.4.1.318.1.1.1.2.2.1.0 | awk '{print $NF}'
echo -n "batteryload.value "
snmpwalk -v 2c -c public $UPSHOST .1.3.6.1.4.1.318.1.1.1.4.2.3.0 | awk '{print $NF}'