From 005ab0c7f5a247aa8fbeeb87eee0b58548e24f25 Mon Sep 17 00:00:00 2001 From: Niall Donegan Date: Mon, 23 Jul 2012 16:52:42 +0100 Subject: [PATCH] Added in a suggest function in order to get the wildcard working again --- plugins/disk/lvm | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/plugins/disk/lvm b/plugins/disk/lvm index 42e3d660..588d3623 100755 --- a/plugins/disk/lvm +++ b/plugins/disk/lvm @@ -8,6 +8,12 @@ # # config (required) # 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$ # @@ -15,14 +21,20 @@ # scripts): # #%# family=auto -#%# capabilities=autoconf +#%# capabilities=autoconf suggest if [ "$1" = "autoconf" ]; then echo yes exit 0 fi -vg=`echo $0 | awk '{ sub(".*lvm","",\$1); print \$1; }'` +if [ "$1" = "suggest" ]; then + vgs -o vg_name --noheadings | sed -e 's/\ *//' + exit 0 +fi + + +vg=`echo $0 | awk '{ sub(".*lvm_","",\$1); print \$1; }'` clean_name() { echo $1 | sed 's/[\/.-]/_/g'