Hi, I'm setting up monitoring of a qtree space usage via snmp.
To do this I had to find out what the OID is that represents this qtree. Does anyone have any suggestions on easily getting this information short of doing an snmwalk and actually looking for it in the output ???
I thought that the qtree ID number would correlate with the snmp index for the qrKBytesUsed, qrFilesUsed and rPathName. But it does not.
From the 'quota report' output it lists my qtree as ID #1 K-Bytes Files Type ID Volume Tree Used Limit Used Limit Quota Specifier ----- -------- -------- -------- -------- -------- ------- ------- --------------- tree 1 auto2 cns-spool-mail 66340484 104857600 9655 - /vol/auto2/cns-spool-mail
From the 'qtree' output the qtree is #5 Volume Tree Style Oplocks Status -------- -------- ----- -------- --------- auto2 unix enabled normal auto2 cns-mailsrv unix enabled normal auto2 cns-perweb unix enabled normal auto2 cns-roaming unix enabled normal --> auto2 cns-spool-mail unix enabled normal
And looking thru the 'snmpwalk' output it looks like it is #5
enterprises.netapp.netapp1.quota.qrTable.qrEntry.qrKBytesUsed.5 = 66313508 enterprises.netapp.netapp1.quota.qrTable.qrEntry.qrKBytesLimit.5 = 104857600 enterprises.netapp.netapp1.quota.qrTable.qrEntry.qrFilesUsed.5 = 9667 enterprises.netapp.netapp1.quota.qrTable.qrEntry.qrFileLimit.5 = -1 enterprises.netapp.netapp1.quota.qrTable.qrEntry.qrPathName.5 = "/vol/auto2/cns-spool-mail" enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVIndex.1.5 = 5 enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVType.1.5 = qrVTypeTree(3)
So it looks like the #5 entry wins ?! Thanks, George
------------------------------------------------------------------------------- George Kahler e-mail: george@yorku.ca Sr. Systems Administrator humans: (416) 736-2100 x.22699 Computing and Network Services machines: (416) 736-5830 Ontario, Canada, M3J-1P3
On Tue, Jun 10, 2003 at 12:56:45PM -0400, George Kahler wrote:
Hi, I'm setting up monitoring of a qtree space usage via snmp.
To do this I had to find out what the OID is that represents this qtree. Does anyone have any suggestions on easily getting this information short of doing an snmwalk and actually looking for it in the output ???
I thought that the qtree ID number would correlate with the snmp index for the qrKBytesUsed, qrFilesUsed and rPathName. But it does not.
From the 'quota report' output it lists my qtree as ID #1 K-Bytes Files Type ID Volume Tree Used Limit Used Limit Quota Specifier ----- -------- -------- -------- -------- -------- ------- ------- --------------- tree 1 auto2 cns-spool-mail 66340484 104857600 9655 - /vol/auto2/cns-spool-mail
From the 'qtree' output the qtree is #5 Volume Tree Style Oplocks Status -------- -------- ----- -------- --------- auto2 unix enabled normal auto2 cns-mailsrv unix enabled normal auto2 cns-perweb unix enabled normal auto2 cns-roaming unix enabled normal --> auto2 cns-spool-mail unix enabled normal
And looking thru the 'snmpwalk' output it looks like it is #5
enterprises.netapp.netapp1.quota.qrTable.qrEntry.qrKBytesUsed.5 = 66313508 enterprises.netapp.netapp1.quota.qrTable.qrEntry.qrKBytesLimit.5 = 104857600 enterprises.netapp.netapp1.quota.qrTable.qrEntry.qrFilesUsed.5 = 9667 enterprises.netapp.netapp1.quota.qrTable.qrEntry.qrFileLimit.5 = -1 enterprises.netapp.netapp1.quota.qrTable.qrEntry.qrPathName.5 = "/vol/auto2/cns-spool-mail" enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVIndex.1.5 = 5 enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVType.1.5 = qrVTypeTree(3)
Just to clarify, the ".5" isn't the tree #. The "qrVIndex" is supposed to actually be the "...number that identifies this entry in the file /etc/quotas in the given volume," but I haven't actually seen that correlation. The fact that the entries end with ".5" and the qrVIndex.1.5 being "5" is purely coincidental.
So it looks like the #5 entry wins ?!
George,
I just finished pulling my hair out over this... My implementation if more of a push rather than a pull (in SNMP-speak, mine is a trap rather than a poll).
The Filer sends traps such as "Soft block limit exceeded for user 3325, tree 1 on volume students." but there doesn't seem to be any correlation/pattern as to what "tree 1" is, exactly.
I've basically manually mapped out what the tree #'s are so that my trap-receiver can take appropriate action. My only hope is that the tree #'s don't change if/when I reboot the filer...
-- Dave Le Blanc Unix Systems Administrator Computer Science Department California Institute of Technology (626)395-2402
Quoting message received from David Le Blanc:
The Filer sends traps such as "Soft block limit exceeded for user 3325, tree 1 on volume students." but there doesn't seem to be any correlation/pattern as to what "tree 1" is, exactly.
What software do you use to receive such traps? I've written a piece of software that queries some status messages via SNMP on demand (and draws some RRDs etc) - a trap host would be much better, of course. So, is there any useable software? (unix based, gpl/free)
Greetings,
On Tue, Jun 10, 2003 at 09:20:25PM +0200, Stefan Funke wrote:
Quoting message received from David Le Blanc:
The Filer sends traps such as "Soft block limit exceeded for user 3325, tree 1 on volume students." but there doesn't seem to be any correlation/pattern as to what "tree 1" is, exactly.
What software do you use to receive such traps? I've written a piece of software that queries some status messages via SNMP on demand (and draws some RRDs etc) - a trap host would be much better, of course. So, is there any useable software? (unix based, gpl/free)
I have UCD-SNMP (now known as Net-SNMP) running as a NMS (snmptrapd, trap recv). The daemon is configured to run a custom script (which I wrote) every time a trap is received. The script handles all kinds of events (UPS, AuthFail, and Filer). In response to a "quota softLimit exceeded", it will lookup the quota/usage values via SNMP and transmit a "warning" to the user such that they have xxxKB left before their mail begins bouncing. Of course, the drawback is if they've already written to fill to their "hard limit", the warning will bounce...but the user will probably know they are over quota if that happens.
The daemon (part of Net-SNMP), and the script (written in Perl) are "free", as in "free beer".
I also have some nifty polling goin' on with a polling script (again, which I wrote in Perl) which queries the filer, stores the data in RRDs and graphs the data... MRTG was a bit too clunky for me, so I wrote my own. I have disk space (for all volumes) and Filer CPU status running out of one little Perl script, which I eventually have to document -- if I get hit by a bus, no one will know how it works...
For nifty pointy-clicky-type graphs, check out Cactus (http://www.raxnet.net/products/cacti/), its also GPL. It uses RRD and SQL to store data, and PHP to display data in nice graphs. The graphs are created dynamically by default (so you don't have to store the images anywhere), and the system is authentication-based, which lets OTHER (non-sysadmin-types) people create/view/edit graphs, if you want.
-- Dave Le Blanc Unix Systems Administrator Computer Science Department California Institute of Technology (626)395-2402