1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-24 18:07:20 +00:00

Initial version

This commit is contained in:
Radar 2009-04-16 16:52:15 +02:00 committed by Steve Schnepp
parent 98510dddab
commit e5ea4ad727

34
plugins/other/snmp__ups_voltage Executable file
View file

@ -0,0 +1,34 @@
#!/bin/sh
#
# Plugin to monitor voltage from UPS APC 9619
# 2009/04/10 12:27:02 radar AT aol DOT pl
#
# ln -s /usr/share/munin/plugins/snmp__ups_voltage /etc/munin/plugins/snmp_UPS.IP_ups_voltage
#
# 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 - Voltage"
echo "graph_args --base 1000"
echo "graph_vlabel Voltage in (-) / out (+)"
echo "graph_category sensors"
echo "graph_info This graph shows the voltage read from $UPSMODEL"
echo "voltagein.label V"
echo "voltagein.type GAUGE"
echo "voltagein.info Voltage."
echo "voltagein.graph no"
echo "voltageout.label V"
echo "voltageout.type GAUGE"
echo "voltageout.info Voltage."
echo "voltageout.negative voltagein"
exit 0
fi
echo -n "voltagein.value "
snmpwalk -v 2c -c public $UPSHOST .1.3.6.1.4.1.318.1.1.1.3.2.1.0 | awk '{print $NF}'
echo -n "voltageout.value "
snmpwalk -v 2c -c public $UPSHOST .1.3.6.1.4.1.318.1.1.1.4.2.1.0 | awk '{print $NF}'