Monitoring data throuhput from SAN switches
Joerg Linge
pitchfork at ederdrom.de
Thu Jun 12 16:11:30 CEST 2008
Christian Schneemann schrieb:
> On Thursday June 12 2008 03:30:12 pm Joerg Linge wrote:
>> Christian Schneemann schrieb:
>>> On Thursday June 12 2008 02:25:49 pm Max wrote:
>>>> On Thu, Jun 12, 2008 at 7:30 AM, Christian Schneemann
>>>>
>>>> <cschneemann at suse.de> wrote:
>>>>> Hi,
>>>>>
>>>>> I want to monitor the data throughput from SAN Switchen in nagios, so
>>>>> that I can use pnp after that to visualise it.
>>>>>
>>>>> I can't believe that I would be the first one who wants to do this ;)
>>>>>
>>>>> Any recommendations? Is there already a plugin for this?
>>>>>
>>>>> I'm playing around with snmp, but I don't want to reinvent the wheel ;)
>>>> For most SAN switches you do not have to reinvent the wheel :), just
>>>> use one of the many plugins available that allow you to query IF-MIB
>>>> metrics.
>>> Hi,
>>> I want to monitor the FC-Ports, not the ethernetports.
>>>
>>> I've played around with the FCMGMT-MIB. And here with
>>> connUnitPortStatCountTxObjects and connUnitPortStatCountRxObjects.
>>> My problem is, that tey are hex values and they are to big for perl's
>>> hex() function. (perl 5.8.8)
>> Hi Christian,
>>
>> try swFCPortTxWord and swFCPortRxWord ( tested on Brocade switches )
> thanks, wich MIB are they in? I can't find them
Just a little code example.
Not enough to put the plugin on nagiosexchange
Joerg
[...]
my $swFCPortPhyState = ".1.3.6.1.4.1.1588.2.1.1.1.6.2.1.3.$opt_P";
my $swFCPortLabel = ".1.3.6.1.4.1.1588.2.1.1.1.6.2.1.36.$opt_P";
my $swFCPortTxWords = ".1.3.6.1.4.1.1588.2.1.1.1.6.2.1.11.$opt_P";
my $swFCPortRxWords = ".1.3.6.1.4.1.1588.2.1.1.1.6.2.1.12.$opt_P";
my $result = $session->get_request(
-varbindlist => [$swFCPortPhyState, $swFCPortTxWords,
$swFCPortRxWords, $swFCPortLabel]
);
$session->close;
if (!defined($result)) {
printf("ERROR: %s.\n", $session->error);
exit 1;
}
$opt_P = $opt_P-1;
my $PerfData = "|TxWord=$result->{$swFCPortTxWords}c;;;;
RxWord=$result->{$swFCPortRxWords}c;;;;";
my $label = $result->{$swFCPortLabel};
for ($result->{$swFCPortPhyState}){
if (/1/){ print "CRITICAL: No Card found in Port $opt_P ($label)
$PerfData\n" and exit 2;};
if (/2/){ print "OK: No Gbic found in Port $opt_P ($label) $PerfData\n"
and exit 0;};
if (/3/){ print "CRITICAL: Laser fault on Port $opt_P ($label)
$PerfData\n" and exit 2;};
if (/4/){ print "CRITICAL: Port $opt_P is not recieving Light ($label)
$PerfData\n" and exit 2;};
if (/5/){ print "CRITICAL: Port $opt_P is not in Sync ($label)
$PerfData\n" and exit 2;};
if (/6/){ print "OK: Port $opt_P is in Sync ($label) $PerfData\n" and
exit 0;};
if (/7/){ print "CRITICAL: Power fault on Port $opt_P ($label)
$PerfData\n" and exit 2;};
if (/8/){ print "CRITICAL: Diag Fault on Port $opt_P ($label)
$PerfData\n" and exit 2;};
if (/9/){ print "CRITICAL::Lock Ref on Port $opt_P ($label) $PerfData\n"
and exit 2;};
}
print "UNKNOWN: State id $result->{$swFCPortPhyState} not known for Port
$opt_P\n";
exit 3;
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list