check_snmp_brocade

monitor Brocade fibre channel switches

check_brocade

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= ] [--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.