Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


TIP: Setting up some basic capturing for Network Appliance

 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
gwynnebaer



Joined: 13 Apr 2002
Posts: 29
Location: Santa Barbara, CA

PostPosted: Thu Apr 25, 2002 8:19 am    Post subject: TIP: Setting up some basic capturing for Network Appliance Reply with quote

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:

#!/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:

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
Back to top
raX
Lead Developer


Joined: 13 Oct 2001
Posts: 2234
Location: Carlisle, PA

PostPosted: Thu Apr 25, 2002 8:57 pm    Post subject: Reply with quote

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
Back to top
bbchawk



Joined: 07 Feb 2004
Posts: 2
Location: Germany

PostPosted: Tue Mar 23, 2004 3:52 pm    Post subject: Reply with quote

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
Back to top
Guest






PostPosted: Tue Apr 27, 2004 11:03 pm    Post subject: Reply with quote

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.
Back to top
SeanLee



Joined: 29 Oct 2003
Posts: 44

PostPosted: Wed Aug 04, 2004 4:39 pm    Post subject: Reply with quote

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





PostPosted: Wed Apr 27, 2005 7:08 pm    Post subject: can someone get this on the new cacti Reply with quote

Hi,

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

thanks
Back to top
aboyz
Guest





PostPosted: Fri May 13, 2005 3:33 am    Post subject: I'm lost.. Reply with quote

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..
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group