Home Directory Plugins Hardware Network Gear Brocade check_snmp_brocade - monitor Brocade fibre channel switches

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

check_snmp_brocade - monitor Brocade fibre channel switches

Rating
10 votes
Favoured:
4
Current Version
2.1.0
Last Release Date
2012-05-21
Compatible With
  • Nagios 3.x
License
Other
Hits
84896
Files:
FileDescription
check_snmp_brocade_3.2.0The plugin itself
sample_commands.cfgSample command definitions
check_brocade_systeminfo.phppnp4nagios template for fans and temperature
check_brocade_sfptemp.phppnp4nagios template for SFP temperature
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
check_snmp_brocade is a Nagios plugin to monitor the status of a single fc-port on a Brocade (labeled or original) fibre-channel switch. It is (in my opinion) the most complete plugin for brocades. I needs the MIBs from Brocade.By Martin Fuerstenau

It monitors all the given port or the systeminfo (gobal and sensors like fan, temp etc.). If a Fabric watch license is installed it is possible to monitor the temperature of the SFPs.

Be aware that a nonused port should be disabled. Otherwise a plugin can't determine wether a ports partner is dead or a port is simply unused

Output from --help:

./check_snmp_brocade --help
This monitoring plugin is free software, and comes with ABSOLUTELY NO WARRANTY.
It may be used, redistributed and/or modified under the terms of the GNU
General Public Licence (see http://www.fsf.org/licensing/licenses/gpl.txt).

Usage: check_snmp_brocade [ -H ] [ -t ] [ -C|--community= ] [ -v|--snmpversion=<1|2c> ] [--port=] [ -P|--fc-port=] | [-s|--systeminfo [ --sensor ]] | [[ --sfptemp ] [--sfptemp_warn=] [--maxsfptemp=] [--allports]] [ -p|--performancedata ] [--multiline]

This plugin check the selected FC-port of a Brocade (branded or unbranded) fibrechannel switch

-h, --help                  Print detailed help screen
-V, --version               Print version information
-H, --hostname=STRING       Hostname/IP-Adress to use for the check.
-C, --community=STRING      SNMP community that should be used to access the switch.
-v, --snmpversion=STRING    Possible values are 1 or 2c. Version 3 is not supported.
    --port=INTEGER          If other than 161 (default) is used)
-P, --fc-port=INTEGER       Port number as shown in the output of `switchshow`.Can't combine with -s

-s, --systeminfo            Get global data like boot date, overall status, reachability etc.
    --sensor                Additional to -s. Status of powersupply, fans and temp sensors.
    --global                Global data like boot date, overall status etc.

-p, --performancedata       Print performance data of the selected FC port.
-t, --timeout=INTEGER       Seconds before plugin times out (default: 15)
    --sfptemp               Checks the temperature of all SFPs.
    --sfptemp_warn=INT      This is the warning offset the critical temperature as delivered
                            by the system. Default is 10 Celsius.
                            MUST be used with --sfptemp.
    --maxsfttemp            Maximum temperature for SFPs. If not set it will be taken from
                            your switch.
    --allports              Default is only to show ports which are too hot. With this flag all ports
                            will be shown. MUST be used with --sfptemp.
    --multiline             Multiline output in overview. This mean technically that a multiline
                            output uses a HTML
for the GUI instead of
                            Be aware that your messing connections (email, SMS...) must use
                            a filter to file out the
. A sed oneliner will do the job.

 

History:

  • 15 Sep 2011 Version 1
    • First released version. Versions before number 1 were derived from the work of Christian Heim. But now the complete code was rewritten.
  •  17 Sep 2011 Version 1.1
    •  Switched from net-snmp-perl to perl-Net-SNMP. Although the coding is  a little bit more complex we have the abibility to get complete tables  tables with one request which makes getting sensor data (temp, fan, power)  more easy.
    •  SNMP version no longer hard coded. Default is 1 but 2c can be handeled over.
    •  If 161 can't be used an alternative port can be given.

 

  •  22 Sep 2011 Version 1.2
    • Removed subroutine check_port_status because it was only used once. so it  doesn't mad sense.
    • Try to get partner WWN if possible

 

  •  20 Mar 2012 Version 1.3
    •  Added an "offset" for the fc port. In GUI and from the commandline port numbering starts with 0. SNMP starts with 1. Here we have we hava an offset which can lead  to misunderstandings and confusion. Fixed.
    •  Detects Fabric Watch license. If Fabric Watch is enabled we are able to get a lot more information.
    •  Kicked out some subroutines.
      •  snmpget - This was not effective. Before every get a new session was established. Data had to be handled over and passed back. Thee effective code where to lines. It was a nice at a first look but it was more effective to place the code  in the main function
      •  The same for the perfdata. The routine was only used once. So it doesn't make  sense to have a subroutine.
  • 21 Apr 2012 Version 2.0.0
    • Bugfix: If a SNMP session can't be established the program exits with an error message. The next line was a session close. this caused un unwanted error message because there was no session. Fixed.
    • The program part for getting port data was part of the main code. Moved to a subroutine.
    • The program part checking for an enabled Fabric Watch license was part of the getting port data code. Moved to a subroutine.
    • New flag --multiline. Multiline output in overview. This mean technically that a multiline output uses a HTML
      for the GUI instead of the default ( ). Be aware  that your messing connections (email, SMS...) must use a filter to file out the
      .  A sed oneliner like the following will do the job: sed 's/<[^<>]*>//g'
    • New flag -s|--systeminfo. Get global data like boot date, overall status, reachability etc
    • New flags --sfptemp, --sfptemp_warn and --allports. Checks the temperature of all SFPs. --sfptemp_warn=INT  will set the warrning offset to the critical temperature as delivered by the system. Default is $SPF_TempHighWarn_def in Celsius.  --allports will show all ports. Default is only to show ports which are too hot.--sfptemp_warn and --allports MUST be used with --sfptemp.
  •  21 May 2012 Version 2.0.1
    • New flag --maxsfptemp.
    • Little bugfix. The SFP temperatures delivered by the system may be kinda bullshit. So on 5300 min. is reported around -30 degrees celsius and max. is +90 degrees celsius. Because the lower is scrap we have used 0 degrees Celsius as the lowest when designing this plugin. But late we reckognized that 90 degrees is also too high. flexoptics for example say 0 - 70 degrees. Therefore we changed some things. If $SFP_TempHigh is no set via commandline the temperature from the system will be taken.
  • 30 May 2012 Version 2.1.0
    • First publically available version
    • New flag --sensor Additional flag to -s. Delivers the values of the onboard sensors for temperature, fans and power.
  • 5 Jun 2013 Version 3.2.0
    • Implemented the changes of Rene Koch, ovido gmbh (r.koch_at_ovido.at)
      • 26 April 2013 Version 3.0.0
        • Added support for SNMPv3 (Rene Koch)
        • Changed exit code to 3 (UNKNOWN) if input validation fails
    • Not implemented because of a possible misunderstanding. Perhaps later.
      • 06 May 2013 Version 3.1.0
        • Added warning and critical checks (Rene Koch)
    • Changed exit code for failed input validation back to 1. Why? 3 means UNKNOWN. UNKNOWN is a state  returned from the plugin if the plugin receives data (or nothing) from the checked item where it is not possible to determine a correct error state. But wrong input validation is a minor error. Therefore  WARNING is the correct state.
    • Did some cosmetics. Like many people Rene uses the opening curly brace in the same line as the if statement. I always prefer both curly braces in the same column for better readability.
    • Cleaned up the code
    • Replaced tabs with blanks in formatting. Why? Different editors -> different tab stops -> rotten format in editor
    • Rewritten session establishing section. No need for elsif.
       
Reviews (7)
byvictore, May 7, 2024
Hello!

I would need a parameter where only CRC errors can be monitored.
I couldn't find such an option among the current possibilities.
Thank you.
Hi All,
It works great if SAM is fully equipped but how to take care if it is partially equipped, As it is in warning state always :

In my case :
SLOT-2/TEMP-2: Sensor absent
SLOT-3/TEMP-3: Sensor absent
bygenti, September 9, 2015
I only use it to monitor the system health and for that use case it works fine.

Although I figured out, that the performance data is in an incorrect format. Between several counters you'll need to have a space to seperate. So by default the output is like this:
|SLOT-0/TEMP-1=38;;;SLOT-0/TEMP-2=26;;;SLOT-0/TEMP-3=38;;;SLOT-0/TEMP-4=23;;;FAN-1=9926;;;FAN-2=9782;;;

Correct would be:
|SLOT-0/TEMP-1=38;;; SLOT-0/TEMP-2=26;;; SLOT-0/TEMP-3=38;;; SLOT-0/TEMP-4=23;;; FAN-1=9926;;; FAN-2=9782;;;

Here's a patch, that fixed it for me:
https://github.com/pashol/nagios-checks/blob/master/check_snmp_brocade.patch
byPeer, June 25, 2014
I manage to monitor the overall system status anf the FC ports, which is good.

I don't have FabricWatch as I think it is too expensive.

Is there a way to monitor FC port temp without FW?

Do you plan to release fcport monitor pnp4nagios template too?
bydozla, May 13, 2014
Works like a charm!
bywillemdh, January 15, 2014
Thanks you for this very nice plugin. We are making good use of it and untill now did not have any problems with it. Configuration is easy and already had some nice results.
bySDK, March 19, 2013
1 of 1 people found this review helpful
Its a nice overall plugin. But it's performance data is incorrect. The plugins check's via SNMP the Words RX & TX. These are absolute numbers (they increase over time, they are not delta values!). The script has no logic in it to calculate the delta. So the Graph's for Throughput are misleading, this is the total that the port has put through, since the counter was resettet. Because of that error the graphs constantly rise although in reality the throughput is not. Once the counter is resettet (you can do this with the Brocade GUI Reset Counters), the throughout graphs drop...
Owner's reply

I know that the counters are deltas. Therefore there is no alert mechanism for traffic with this plugin. But for history pnp4nagios uses rrdtool and rrdtool gets the actual counter with its timestamp and calculates the delta. I use the plugin for over one year now and I can't reproduce the problem. A counter reset is also handled by rrdtool. The plugin is used in a lot of installations and I got a lot of feedback. But nobody told me about such a problem. Maybe something other is wrong.

Yours - Martin