TIP: Setting up some basic capturing for Network Appliance

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
gwynnebaer
Posts: 35
Joined: Sat Apr 13, 2002 5:16 pm
Location: Santa Barbara, CA

TIP: Setting up some basic capturing for Network Appliance

Post by gwynnebaer »

A poster asked me a question about an earlier post and how I captured the data. Since I had to collect my steps and write them down, I thought I would share them with the general group.

Here they are:

We're using many different Netapps, F520's, F630's, and F740's.

One trick which really helped to start things off was making sure you are running a current (or at least recent) OS on your netapps.

I'm running 6.1.2R2 for the ones which support it. The reason this is important is because I use SNMP to capture the data I want, and the MIBs from the newer version are much better/consistent.

For the ops, I read the trap file in /etc/mib/traps.dat that explains what each OID does, and then started extracting. To get CIFS/NFS ops chart, I created three data sources, one for cifs, one for nfs, and one for the total of the two. The first two are data source type COUNTER and data input type "Get SNMP Data", with values of hostname, the community string "public" (or yours if you have changed it), and finally the two OIDs for cifs and nfs data.

cifs oid: .1.3.6.1.4.1.789.1.7.3.1.1.1.0
nfs oid: .1.3.6.1.4.1.789.1.2.2.1.0

The third data set doesn't exist directly within the SNMP tree. So I created it by creating a new "Data Input Source". The way I chose to do it was by writing a little script that gets passed as many OIDs as you want, and an option of what to do with the data from those OIDs. Thus this script requires either access to the "snmpget" command (in unix) or use of Perl and the SNMP_Session module. I chose to be lazy and used snmpget.

Here's the script I wrote (I put it in the scripts dir):

Code: Select all

#!/usr/bin/perl -s

$cmd_snmpget = '/usr/local/bin/snmpget';

chomp(@data = qx($cmd_snmpget -O neEXbqfsStv @ARGV));

if      ($debug) {
    print "ARGS: @ARGV\n";
    print map { "DATA: $_\n" } @data;
} elsif ($add) {
    foreach $set (@data) {
        $total += $set;
    }
    print $total;
} elsif ($subtract) {
    # Assume only two data sets
    print abs($data[0] - $data[1]);
}


exit(0);
The data source I called "Get External SNMP Data" and has the fields:
community
data
ip
oids
options

Only the "data" field is marked "Update RRA".

The input string looks like this:
<path_cacti>/scripts/snmp.pl <options> <ip> <community> <oids>

The output string looks like this:
<data>

So then I just pass both OIDs to this script along with the option "-add" and this returns the aggregate sum. I put this into a data source called "ops_total", type COUNTER.

Finally, I graph them like this (the order is important to make the graph look right):

Code: Select all

Graph Item  Data Source Name  Graph Item Type  Item Color Sequence  Add  
Item #1  arna01_ops_tot  AREA     002A8F  [Down], [Up]  Remove  
   Item #2  arna01_ops_tot: Cur:  GPRINT      [Down], [Up]  Remove  
   Item #3  arna01_ops_tot: Avg:  GPRINT      [Down], [Up]  Remove  
   Item #4  arna01_ops_tot: Max:<HR>  GPRINT      [Down], [Up]  Remove  
Item #5  arna01_ops_nfs  LINE2     CAF100  [Down], [Up]  Remove  
   Item #6  arna01_ops_nfs: Cur:  GPRINT      [Down], [Up]  Remove  
   Item #7  arna01_ops_nfs: Avg:  GPRINT      [Down], [Up]  Remove  
   Item #8  arna01_ops_nfs: Max:<HR>  GPRINT      [Down], [Up]  Remove  
Item #9  arna01_ops_cifs  LINE2     AAABA1  [Down], [Up]  Remove  
   Item #10  arna01_ops_cifs: Cur:  GPRINT      [Down], [Up]  Remove  
   Item #11  arna01_ops_cifs: Avg:  GPRINT      [Down], [Up]  Remove  
   Item #12  arna01_ops_cifs: Max:<HR>  GPRINT      [Down], [Up]  Remove  
That's about it. I also graph (on separate graphs and lots of data sources of course) the disk usage and network traffic (KB in/out/total) and will likely graph inode usage and other data as I find them valuable.

I'm working with my employer to externalize the charts we run so that others can see them if they want, but we'll see if they will let me or not.

Thanks,

-gwynnebaer
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

Wow... I am quite impressed! I think this article deserves to be bumped to the top. I don't currently have a Netapp, but you make me want to go out and buy one ;-)

Thanks for all your help.

-Ian
bbchawk
Posts: 2
Joined: Sat Feb 07, 2004 9:53 am
Location: Germany

Post by bbchawk »

It ist a long time ago since gwynnebaer posted this message, anyway i would like to ask if anyone have more information about monitoring Network Appliance (NetApp) Servers.

We are using some NetFiler F740 and i basically want to ask what values/things i can monitor using cati/snmp. Have somebody experience in monitoring NetFiler ?

thanx, bbchawk
Guest

Post by Guest »

For CIFS/NFS ops/sec you should be using 1.3.6.1.4.1.789.1.2.2.8.0 and 1.3.6.1.4.1.789.1.2.2.6.0 rather than the OIDs in the original post. There was a bug with some versions of DOT where the original OIDs would wrap , and MRTG/rrdtool doesnt deal with it.
SeanLee
Posts: 44
Joined: Wed Oct 29, 2003 10:41 pm

Post by SeanLee »

Can anyone translate this to the current version of Cacti?
aboyz

can someone get this on the new cacti

Post by aboyz »

Hi,

was wondering if this is aviliate on the new cacti . i need some help to install this

thanks
aboyz

I'm lost..

Post by aboyz »

Can someone try to explain it to me a little bit better , becuase i'm totally lost.. can someone make a host template out of it. and post it here..

thansk..
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest