HPE EVA Storage
1825773 Members
2050 Online
109687 Solutions
New Discussion

Re: mrtg and HP Storagework SANswitch2/8v

 
SOLVED
Go to solution
Nguyen Anh Tien
Honored Contributor

mrtg and HP Storagework SANswitch2/8v

I must monitor data in/out HP Storagework SANswitch2/8v on each ports.
I installed mrtg on Redhat 9.0. mrtg. Mrtg is OK (i try to gather data from cisco router and PC nic, mrtg draw correctly)
But I get problem with HP Storagework SANswitch2/8v and HP fc entry switch 8B. mrtg can only draw dataI/O graph for 1 port.
Attached file is mrtg.conf
HP is simple
8 REPLIES 8
Imel Rautenbach
Occasional Advisor

Re: mrtg and HP Storagework SANswitch2/8v

I use mrtg and perl to get data from my MSA1000. I run mrtg on Redhat Advanced server 3.0. For snmp to return SAN data I suspect you may need to have all the linux hp agents installed.

I spent a lot of time using GetIf to browse the snmp data looking for the info I was after.

Current Active controller:
I have two controllers, and use the following to see which controller is the current active one:

#!/usr/bin/perl
use SNMP_util;
use SNMP_Session;

($value) = &snmpget("public\@127.0.0.1",".1.3.6.1.4.1.232.16.2.2.1.1.10.1.1");
if ($value)
{
$value = 1 if $value ==3 ;
$value = 0 if $value ==4 ;
print "$value\n";
}
else { print"0\n"; }

($value) = &snmpget("public\@127.0.0.1",".1.3.6.1.4.1.232.16.2.2.1.1.10.1.2");
if ($value)
{
$value = 1 if $value ==3 ;
$value = 0 if $value ==4 ;
print "$value\n";
}
else { print"0\n"; }
print "\n\n";

This script returns two numbers, in mrtg external source format.
if the first number is a 1 then the first controller is active, else the second number will be 1 (and the other will be 0)



Disk IO:
To get the stats for individual disks (I/O, throughput, errors, etc) i use the following script:

/etc/mrtg/snmpget.pl 127.0.0.1 .1.3.6.1.4.1.232.16.2.5.1.1.10.1.$1
/etc/mrtg/snmpget.pl 127.0.0.1 .1.3.6.1.4.1.232.16.2.5.1.1.12.1.$1
echo "$1"
echo "$1"



I summarise all the info in a cgi script (screenshot attached)

Hope this helps.

Regards
Imel
Nguyen Anh Tien
Honored Contributor

Re: mrtg and HP Storagework SANswitch2/8v

Imel
Can you explain Why i can not get data from san swith bu mrtg? (PC nic is OK)?
HP is simple
Steve Bonds
Trusted Contributor

Re: mrtg and HP Storagework SANswitch2/8v

The problem is that MRTG is designed to poll SNMP variables from MIB-II by default. The switches only report MIB-II data for the built-in ethernet interface, so that's what MRTG is plotting.

This probably isn't what you want.

You need to override the MIB-II information in the MRTG config with equivalent info from the switch MIB. For Brocade 2800s the SNMP OID is:

.1.3.6.1.4.1.1588.2.1.1.1.6.2.1.11.X
.1.3.6.1.4.1.1588.2.1.1.1.6.2.1.12.X

You need to change your Target[] lines in the MRTG config to poll the proper SNMP values.

For example, to poll Fibre Channel port 0 on a Brocade 2800 use:

-----
Target[switch01-port0]: .1.3.6.1.4.1.1588.2.1.1.1.6.2.1.11.1&.1.3.6.1.4.1.1588.2.1
.1.1.6.2.1.12.1:public@switch01
MaxBytes[switch01-port0]: 12500000
Title[switch01-port0]: Fibre Channel Traffic
PageTop[switch01-port0]:

Traffic on switch01 port 0


Unscaled[switch01-port0]: dwmy
Options[switch01-port0]: growright
-----

For port 1, use (long-OID).2.1.11.2 and (long-OID).2.1.12.2, etc.

Unfortunately, Brocade changes the OID needed for each switch family so you probably won't be able to just use these Brocade 2800 examples as-is.

The MIBS for other Brocades are available via http://www.brocadeconnect.com/

-- Steve
Nguyen Anh Tien
Honored Contributor

Re: mrtg and HP Storagework SANswitch2/8v

Hi steve.
Can you post MIB of HP Storagework SANswitch2/8v and HP fc entry switch 8B for me?
I can not get it form www.brocadeconnect.com
many thank
tienna
HP is simple
Imel Rautenbach
Occasional Advisor

Re: mrtg and HP Storagework SANswitch2/8v

To get MIB data from the MSA1000 controllers I use the following MIB:
1.3.6.1.4.1.232.16.2.2.1.1.10.1.x

Hope it helps
Imel



Steve Bonds
Trusted Contributor

Re: mrtg and HP Storagework SANswitch2/8v

Nguyen:

I don't have the MIB for either of those switches. The Brocade Connect site should work, though it's hard to navigate and you'll need to figure out which Brocade model is equivalent to your HP model.

If that doesn't work, you might try HP Support, though my luck getting MIBs from them has been poor.

-- Steve
Steve Bonds
Trusted Contributor
Solution

Re: mrtg and HP Storagework SANswitch2/8v

Nguyen:

The HP product information page for the HP StorageWorks SAN Switch 2/8v has a PDF containing MIB information, as well as a really nice introduction to SNMP. I think the information in that document would be very useful for your MRTG monitoring.

Here's a link directly to the product, if it works:

http://h20000.www2.hp.com/bizsupport/TechSupport/Resource.jsp?locale=en_US&taskId=120&prodSeriesId=254591&prodTypeId=12169

Select the link "manuals (guides, supplements, addendums, etc)".

The document you want is titled "HP StorageWorks Management Information Base V4.2.X Reference Guide HP StorageWorks Management Information Base V4.2.X Reference Guide"

This direct link may work, depending on how HP has their site set up:

http://h200002.www2.hp.com/bc/docs/support/SupportManual/c00067404/c00067404.pdf

MRTG works wonderfully for monitoring just about anything via SNMP, but it does require quite a bit of tweaking to monitor anything other than MIB-II OIDs.

-- Steve
Alan_152
Honored Contributor

Re: mrtg and HP Storagework SANswitch2/8v

This is a cfg file I use for this model of switch. Be sure to telnet into the switch first and set up "snmpconfig --set accesscontrol"

#-------------------------------------------------------------------------------
#--
#-- mrtg.cfg for sansw8
#--
#--
#-- swFCPortTxWords = This object counts the number of Fibre Channel
#-- words that the port has transmitted.
#--
#-- let's multiply by 4 to calculate the correct number of bytes
#--
#--
#--
#-- Switchport Nr + 1 -----+ Switchport Nr + 1 -----+
#-- V V
#-- 1.3.6.1.4.1.1588.2.1.1.1.6.2.1.12.1&1.3.6.1.4.1.1588.2.1.1.1.6.2.1.11.1
#--
#--
#-------------------------------------------------------------------------------

#-------------------------------------------------------------------------------
#-- Global Config Options
#-------------------------------------------------------------------------------
EnableIPv6: no
Workdir: /var/www/sansw8


#-------------------------------------------------------------------------------
#-- Global Defaults
#-------------------------------------------------------------------------------
Options[_]: noinfo, growright
MaxBytes[_]: 104857600
LegendI[_]: read 
LegendO[_]: write 
Legend1[_]: read 
Legend2[_]: write 
YLegend[_]: port throughput
WithPeak[_]: dwmy

#-------------------------------------------------------------------------------
Target[fcswitch_port0]: 1.3.6.1.4.1.1588.2.1.1.1.6.2.1.12.1&1.3.6.1.4.1.1588.2.1.1.1.6.2.1.11.1:public@sansw8.test * 4
Title[fcswitch_port0]: fc throughput on sansw8 port 0
PageTop[fcswitch_port0]:

fc throughput on switch sansw8 port 0



#-------------------------------------------------------------------------------
Target[fcswitch_port1]: 1.3.6.1.4.1.1588.2.1.1.1.6.2.1.12.2&1.3.6.1.4.1.1588.2.1.1.1.6.2.1.11.2:public@sansw8.test * 4
Title[fcswitch_port1]: fc throughput on sansw8 port 1
PageTop[fcswitch_port1]:

fc throughput on switch sansw8 port 1