On Thu, Mar 30, 2006 at 04:33:57PM -0800, Sphar, Mike wrote:
I had hoped I might be able to pull individual user and tree quota reports from the filer via snmp, but I'm not having much luck with it,
It it possible, we're doing it.
BigBrother (www.bb4.org) has a contributed script (www.deadcat.net), which does it, and using BigBrothers graph-plugin we're also getting nice graphs.
But on to the relevant part of the script (written by Sean MacGuire - BB4 Technologies Inc.): ----------------------------------------------------------------------
# Are quotas enabled? quotaStateOn(2) set `$SNMPWALK $HOST $COMMUNITY quotaState.0` QUOTAS="$4" if test "$QUOTAS" = "quotaStateOn(2)" then
set `$SNMPWALK $HOST $COMMUNITY qrIndex | $TAIL -1` NUMPART="$4" LINE="NetApp has $NUMPART quota trees"
COUNT="1"
while test "$COUNT" -le "$NUMPART" do set `$SNMPGET $HOST $COMMUNITY qrPathName.${COUNT}` DFMOUNT=`eval echo $4` set `$SNMPGET $HOST $COMMUNITY qrKBytesLimit.${COUNT}` DFTTL="$4" if test "$DFTTL" -lt "0" then DFTTL=`expr $TWO32 + $DFTTL` fi set `$SNMPGET $HOST $COMMUNITY qrKBytesUsed.${COUNT}` DFUSED="$4" if test "$DFUSED" -lt "0" then DFUSED=`expr $TWO32 + $DFUSED` fi DFAVAIL=`expr $DFTTL - $DFUSED` DFPCT=`echo "100 * $DFUSED / $DFTTL" | bc` DFNAME="quota-$DFMOUNT"
echo "$DFNAME $DFTTL $DFUSED $DFAVAIL ${DFPCT}% $DFMOUNT" COUNT=`expr $COUNT + 1` done
fi ----------------------------------------------------------------------
You need to have the Netapp MIB and the MIBS environment variable set: $ MIBS=+NETWORK-APPLIANCE-MIB; export MIBS
I've had to make changes to script because the newest NetSNMP has changed it output, compared to older versions. Depending on the output you may have to change the $4 to $3.
So any suggestions out there about tools, scripts, whatever that can do this for us? A nicely formatted html page that anyone can access would be ideal.
BigBrother can do it, but it's not exactly plug'n'play. On our version of BB we have the following plugins:
http://www.deadcat.net/viewfile.php?fileid=885 http://www.deadcat.net/viewfile.php?fileid=82
Which then requires rrdtool, libgd, etc.