Build precise queries to find exactly what you need
Press ESC to close
change the line:
## Get lv’s and their df’s for vg in `lvs –noheadings –nosuffix –units b –separator ” ” –options vg_name`; do
for:
for vg in `vgs –noheadings –nosuffix –units b –separator ” ” –options vg_name`; do
For enhanced the output, change the entire block code as above:
## Get lv’s and their df’s for vg in `vgs –noheadings –nosuffix –units b –separator ” ” –options vg_name`; do for lv in `lvs –noheadings –nosuffix –units b –separator ” ” –options lv_name $vg`; do if [[ `mount | grep $vg | grep $lv` ]]; then dfout=`df -P –block-size=1 | grep $vg | grep $lv` outper=`echo “$dfout” | grep –only-matching “[0-9]*%”` outname=”$vg/$lv” outmount=`echo “$dfout” | awk ‘{print $6}’` #`echo “$dfout” | awk ‘{ print $1 }’` outnum=`expr match “$outper” ‘([0-9]*)’` if [ $thresh_crit ] && [ “$outnum” -ge “$thresh_crit” ]; then critflag=1 msgs=”$msgs$outname/$outper ($outmount)” elif [ $thresh_warn ] && [ “$outnum” -ge “$thresh_warn” ]; then warnflag=1 msgs=”$msgs$outname/$outper ($outmount)” fi fi done done
We’ve completely redesigned the world’s largest repository of Nagios plugins and monitoring tools. Join thousands of users sharing monitoring solutions for servers, applications, and everything in between.
Due to our redesign, all existing accounts require a password reset to access your account again.
Ready to explore 6,100+ projects and contribute to the community?
Reset Password Create Account
Happy Monitoring!