Ad Widget

Collapse

Template for Brocade Network Devices

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • marcherren
    Junior Member
    • Mar 2011
    • 28

    #1

    Template for Brocade Network Devices

    Hi all,

    I've put together some Brocade specific templates. It also uses an external script for discovery so that only the used ports on a device are monitored.

    Play around and let me know if you are missing anything

    template and script have been added to a zip file due to attachement limits


    1) Needed value mapping:

    Brocade Status

    1 -> unknown
    2 -> ok
    3 -> faulty

    2) copy the script "getUpInt.sh" to the location /usr/local/share/zabbix/externalscripts/ (or where your zabbix installtion points to)

    Rename the .txt to .sh (as I can not upload a .sh file)

    3) give execution rights
    chmod 755 /usr/local/share/zabbix/externalscripts/getUpInt.sh

    4) Add the templates and if needed adapt snmp settings

    The external script can be invoked with the following options

    getUpInt.sh[<snmp version> {HOST.CONN} <community/user> <password>]



    Let me know if you have any questions/suggestions/...

    I've also got an (quick&dirty) perl script to add hosts to zabbix via an excel script. pm me if you are interested

    Best regards,

    Marc
    Attached Files
  • wasabi
    Member
    • Mar 2014
    • 30

    #2
    Hello Marc,

    thank you for the templates and the script.
    It doesn´t work on my ubuntu server 12.04 however. Output of e.g.

    Code:
    ./getUpInt.sh 2c aunfc public
    ends in:
    Code:
    ./getUpInt.sh 2c aunfc public
    {
            "data":[
    
    ./getUpInt.sh: Zeile 57: -On: Kommando nicht gefunden.
            }
    
    
            ]
    }
    Can you help?

    TIA,
    Claudio

    Comment

    • JoohnyO
      Junior Member
      • Jul 2014
      • 25

      #3
      Can you help?
      Your snmpwalk doesn't support -On parameter.

      Also, trythis templates.
      Last edited by JoohnyO; 24-10-2014, 13:12.

      Comment

      • wasabi
        Member
        • Mar 2014
        • 30

        #4
        Thank you for your reply

        Hi JoohnyO,

        snmpget and snmpwalk are installed. I already make use of many snmp-checks.
        Now I managed to change the script to work in my environment.

        The 'cut'´s in $STR didn´t work here so I passed the arguments directly to the variables:

        Code:
        SNMP=$1
        SERVER=$2
        USER=$3
        PASSWD=$4
        In addition the snmpwalk didn´t answer with 'up' but with 1 (up) or 2 (down), so I changed the corresponding grep to 'grep -i "integer: 1"' instead of 'grep up'.

        You can find the modified file as attachment. This works for a standard ubuntu 12.04 server x86_64.

        Regards,
        Claudio
        Attached Files

        Comment

        • marcherren
          Junior Member
          • Mar 2011
          • 28

          #5
          Hi Wasabi,

          The script is a quick hack and was only tested to perform with zabbix and brocade switches.

          As the arguments trough zabbix are passed as one argument only, you need to use " if you want use it on the command line directly.

          As an example:

          Code:
          blackgate:zabbix marc$ ./getUpInt.sh "1 1.1.1.1 bla test"
          One quick way to test this is using shell debuging with : sh +x

          Code:
          blackgate:zabbix marc$ sh -x getUpInt.sh "1 1.1.1.1 bla test"
          Then you should see the correct mapping

          Code:
          + OID_OPER_STATUS=.1.3.6.1.2.1.2.2.1.8
          + OID_DESC=.1.3.6.1.2.1.31.1.1.1.1
          + STR='1 1.1.1.1 bla test'
          ++ echo 1 1.1.1.1 bla test
          ++ cut -f1 '-d '
          + SNMP=1
          ++ echo 1 1.1.1.1 bla test
          ++ cut -f2 '-d '
          + SERVER=1.1.1.1
          ++ echo 1 1.1.1.1 bla test
          ++ cut -f3 '-d '
          + USER=bla
          ++ echo 1 1.1.1.1 bla test
          ++ cut -f4 '-d '
          + PASSWD=test
          Best regards,

          Marc

          Comment

          • wasabi
            Member
            • Mar 2014
            • 30

            #6
            Thank you!

            Hello Marc,

            thank you for your explanation (I´m no coder at all ;-) )!
            I will give it another try soon as my colleagues want the brocade switchports monitored.....

            Best regards
            Claudio

            Comment

            • MAlain74
              Junior Member
              • Apr 2015
              • 8

              #7
              Problem with data retrieve

              Dear all,

              I have been able to have the script running as I show the right command in the Zabbix server log (with debug 4) and the entered command manually give me the interfaces.

              My problem is that there is no items created in my host definition for the discovery.

              Thank you for your suggestions.

              Comment

              • Colttt
                Senior Member
                Zabbix Certified Specialist
                • Mar 2009
                • 878

                #8
                new Brocade Template

                Hello,

                here is my Brocade_template, it was tested on Brocade FCX/MLX/ICX and old FastIrons(Firmware >07.2.02eT7f1).
                It only discovered "UP"-ports. And you need Zabbix >=3.0

                Discoveryrules for: temperatur, fan and power supply. every Port is an "Application"

                Note: Due OID/MIB limitations on Brocade side the trigger for PowerSupply based on diff(!!) not on "not normal", because not presents powersupplys will be marked as failure, so you will get some false positives triggers. if you hace a solution for this you would be welcome!

                Feedback, issues and Suggestions are very welcome!
                Attached Files
                Debian-User

                Sorry for my bad english

                Comment

                Working...