Added munin plugins for OpenBSD.
This commit is contained in:
parent
1d260a4997
commit
87afaeb059
11 changed files with 885 additions and 0 deletions
55
munin/files/plugins/sensors_temp
Executable file
55
munin/files/plugins/sensors_temp
Executable file
|
@ -0,0 +1,55 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Plugin to monitor temperature readings
|
||||
#
|
||||
# Parameters:
|
||||
#
|
||||
# config (required)
|
||||
# autoconf (optional - only used by munin-config)
|
||||
#
|
||||
# Magic markers (optional - used by munin-config and some installation
|
||||
# scripts):
|
||||
#%# family=auto
|
||||
#%# capabilities=autoconf
|
||||
|
||||
|
||||
|
||||
if [ "$1" = "autoconf" ]; then
|
||||
if ( sysctl -a hw.sensors 2>/dev/null >/dev/null ); then
|
||||
echo yes
|
||||
exit 0
|
||||
else
|
||||
if [ $? -eq 127 ]
|
||||
then
|
||||
echo "no (sysctl program not found)"
|
||||
exit 1
|
||||
else
|
||||
echo no
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
|
||||
echo 'graph_title temperature readings'
|
||||
echo 'graph_args -l 0 --base 1000'
|
||||
echo 'graph_vlabel degC ${graph_period}'
|
||||
echo 'graph_category sensors'
|
||||
echo 'graph_period second'
|
||||
echo 'graph_info Temperature readings on mainboard and CPU'
|
||||
echo 'mb.label mainboard'
|
||||
echo 'mb.type GAUGE'
|
||||
echo 'mb.min 15'
|
||||
echo 'mb.max 150'
|
||||
echo 'mb.info mainboard temperature (TSENS1).'
|
||||
echo 'cpu.label CPU'
|
||||
echo 'cpu.type GAUGE'
|
||||
echo 'cpu.min 15'
|
||||
echo 'cpu.max 150'
|
||||
echo 'cpu.info CPU temperature (TSENS2).'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
sysctl -a | awk '/TSENS1/ { print "mb.value " $4 } /TSENS2/ { print "cpu.value " $4 }'
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue