mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
Initial version
This commit is contained in:
parent
3d49277a6c
commit
51c53c6390
42
plugins/other/lvm_snap_used
Executable file
42
plugins/other/lvm_snap_used
Executable file
@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Plugin to monitor the % of allocated area of a LVM snapshot
|
||||
#
|
||||
# Parameters:
|
||||
#
|
||||
# config
|
||||
# autoconf
|
||||
#
|
||||
# Configuration variables
|
||||
# no config variables
|
||||
#
|
||||
#%# family=auto
|
||||
#%# capabilities=autoconf
|
||||
#
|
||||
# 2011/05/20 - pmoranga - initial version
|
||||
|
||||
if [ "$1" = "autoconf" ]; then
|
||||
/usr/sbin/lvdisplay 2>/dev/null >/dev/null
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
echo yes
|
||||
exit 0
|
||||
else
|
||||
echo "no lvdisplay found"
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
echo 'graph_title Allocated space for snapshot'
|
||||
echo 'graph_vlabel %'
|
||||
echo 'graph_category disk'
|
||||
echo 'graph_args --base 100'
|
||||
/usr/sbin/lvdisplay -C | awk '$3 ~ /^s/{print $1".label "$1" snapshot of "$5} '
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
/usr/sbin/lvdisplay -C | awk '$3 ~ /^s/{print $1".value",int($6)} '
|
Loading…
Reference in New Issue
Block a user