Build precise queries to find exactly what you need
Press ESC to close
Hey nice work. I wrote a little wrapper for this to check on every mount point. A little more dynamic for systems where a mount point may get missed by accident.
#! /bin/bash
# Wrapper script for check_hdd_inodes # Checks all mount points in one easy output
if [ $# -ne 2 ] then echo “Usage: $0 [warn %] [crit %]” exit 3 fi
loc=”/usr/local/bin/check_hdd_inodes” out=””
for s in `df -ilP | cut -d”%” -f2 | grep “/”` do getStat=`$loc -w $1 -c $2 -p $s` out=`echo -e “$getStat $out”` done out=`echo “$out” | sed s/”|”/”n “/g`
if [ `echo “$out” | cut -d”;” -f1 | grep CRITICAL | wc -l` -gt 0 ] then echo -e “CRITICAL: inodes above $1 % threshold. Click service name for more info.
$out” exit 2 elif [ `echo “$out” | cut -d”;” -f1 | grep WARNING | wc -l` -gt 0 ] then echo -e “WARNING: inodes above $1 % threshold. Click service name for more info.
$out” exit 1 elif [ `echo “$out” | cut -d”;” -f1 | grep OK | wc -l` -gt 0 ] then echo -e “OK: inodes below thresholds. Click service name for more info.
$out” exit 0 fi
echo “Oops; something went wrong :(” exit 3
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!