mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-24 09:57:09 +00:00
Initial version
This commit is contained in:
parent
01e92580a4
commit
98510dddab
1 changed files with 29 additions and 0 deletions
29
plugins/other/snmp__ups_temp
Executable file
29
plugins/other/snmp__ups_temp
Executable file
|
@ -0,0 +1,29 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Plugin to monitor temperature from UPS APC 9619
|
||||
# 2009/04/10 12:27:02 radar AT aol DOT pl
|
||||
#
|
||||
# ln -s /usr/share/munin/plugins/snmp__ups_temp /etc/munin/plugins/snmp_UPS.IP_ups_temp
|
||||
#
|
||||
# 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- Temperature"
|
||||
echo "graph_args --base 1000 -l 0 "
|
||||
echo "graph_vlabel degrees C"
|
||||
echo "graph_category sensors"
|
||||
echo "graph_info This graph shows the temperature read from $UPSMODEL"
|
||||
echo "temperature.label sensor UPS"
|
||||
echo "temperature.type GAUGE"
|
||||
echo "temperature.info Temperature from sensor UPS."
|
||||
echo "temperature.warning 25"
|
||||
echo "temperature.critical 30"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo -n "temperature.value "
|
||||
snmpwalk -v 2c -c public $UPSHOST .1.3.6.1.4.1.318.1.1.10.2.3.2.1.4.1 | awk '{print $NF}'
|
Loading…
Add table
Add a link
Reference in a new issue