2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

Merge pull request #152 from ndonegan/master

LVM Plugin Fix
This commit is contained in:
Kenyon Ralph 2012-07-23 13:20:06 -07:00
commit e22f00f986

View File

@ -8,6 +8,12 @@
# #
# config (required) # config (required)
# autoconf (optional - used by munin-config) # autoconf (optional - used by munin-config)
# suggest
#
# Needs to be run as root, so the following needs to be added to the config:
#
# [lvm_]
# user root
# #
# $Log$ # $Log$
# #
@ -15,13 +21,19 @@
# scripts): # scripts):
# #
#%# family=auto #%# family=auto
#%# capabilities=autoconf #%# capabilities=autoconf suggest
if [ "$1" = "autoconf" ]; then if [ "$1" = "autoconf" ]; then
echo yes echo yes
exit 0 exit 0
fi fi
if [ "$1" = "suggest" ]; then
vgs -o vg_name --noheadings | sed -e 's/\ *//'
exit 0
fi
vg=`echo $0 | awk '{ sub(".*lvm_","",\$1); print \$1; }'` vg=`echo $0 | awk '{ sub(".*lvm_","",\$1); print \$1; }'`
clean_name() { clean_name() {
@ -32,7 +44,7 @@ clean_name() {
if [ "$1" = "config" ]; then if [ "$1" = "config" ]; then
echo 'graph_title Logical Volume usage' echo 'graph_title Logical Volume usage'
echo 'graph_args --base 1000 -l 0' echo 'graph_args --base 1024 -l 0'
# echo 'graph_vlabel %' # echo 'graph_vlabel %'
echo 'graph_category disk' echo 'graph_category disk'
echo 'graph_info This graph shows disk usage on the machine.' echo 'graph_info This graph shows disk usage on the machine.'