Ad Widget

Collapse

Help!!!Files MIB in zabbix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • frax
    Junior Member
    • Apr 2012
    • 7

    #1

    Help!!!Files MIB in zabbix

    Hello to everyone,
    How can I create a template for a switch in stack (3com 5500 with 3 switches) and one for a huawei switch? I looked that exist SNMP Builder, but it doesn't work on the last version of zabbix 1.8.11...
    I have only a file MIB, and i looked that i must create a file xlm for zabbix...but i don't know how someone can help me?

    Thanks
  • CeeEss
    Senior Member
    Zabbix Certified Specialist
    • Nov 2007
    • 103

    #2
    Have a look at http://www.zabbix.com/wiki/howto/mon...zload_snmpwalk instead.

    SNMP Builder is the brokenest thing in Zabbix-land, with all due respect to whoever's tryng to keep it glued together. Let me take this opportunity to agitate: Zabbix - you still "owe" us proper SNMP handling.

    Most switches are basically similar monitoring-wise, aside from a few switch-specific eccentricities - you have "n" port indexes with corresponding "n" ifInOctets, ifOutOctets, ifIn{OutOErrors, etc. I really recommend RichLV's book "Zabbix 1.8 Network Monitoring", particularily Chapter4. Monitoring SNMP and IPMI Devices, which demostrates how to get ifIn(Out)Octets data quickly from ifDescr, or use an eixsting template intially. Export that template and extract all of the ifIn{OutOctets OIDs and use snmpwalk and snmpget to verify that you're getting the data you want, the mangle the template to provide the number of ports you require. It won't be fun, but it's a great way to learn SNMP on the fly.

    Also make sure you have the MIB saved (in Linux/net-snmp) in /usr/share/snmp/mibs/[MIBfilename].txt and have restarted snmpd.

    Comment

    • troffasky
      Senior Member
      • Jul 2008
      • 567

      #3
      Originally posted by CeeEss
      SNMP Builder is the brokenest thing in Zabbix-land, with all due respect to whoever's tryng to keep it glued together.
      This stuff just dies when it doesn't get merged and original volunteer goes away. Haven't got anywhere with the PHP SNMP builder.

      Does this work for you?

      # ./zload_snmpwalk.pl -u zabbix -P dbpass commstring 10051 asawalk3.snmp
      .DBD::mysql::st execute failed: Column 'type' cannot be null at ./zload_snmpwalk.pl line 316, <SWALK> line 1.
      Insert Failure: DBI::st=HASH(0x9bdb468)->strerror

      Let me take this opportunity to agitate: Zabbix - you still "owe" us proper SNMP handling.
      I get the feeling that SNMP is only grudgingly supported in Zabbix.

      I've been using Zabbix for five years and the answer to 'How to I add X SNMP device to Zabbix?' is the same now as it was back in 2007: 'slowly, patiently and with great difficulty'.

      Comment

      • frax
        Junior Member
        • Apr 2012
        • 7

        #4
        The file .mib

        Hello,
        thanks for your answer
        I have a lot of doubts...i have the file .mib, how can convert this file in file .txt?
        I tried snmpwalk, but doesn't work
        Today i will try to read the manual...i hope to fix my doubts...

        Thanks again


        Than
        QUOTE=CeeEss;99117]Have a look at http://www.zabbix.com/wiki/howto/mon...zload_snmpwalk instead.

        SNMP Builder is the brokenest thing in Zabbix-land, with all due respect to whoever's tryng to keep it glued together. Let me take this opportunity to agitate: Zabbix - you still "owe" us proper SNMP handling.

        Most switches are basically similar monitoring-wise, aside from a few switch-specific eccentricities - you have "n" port indexes with corresponding "n" ifInOctets, ifOutOctets, ifIn{OutOErrors, etc. I really recommend RichLV's book "Zabbix 1.8 Network Monitoring", particularily Chapter4. Monitoring SNMP and IPMI Devices, which demostrates how to get ifIn(Out)Octets data quickly from ifDescr, or use an eixsting template intially. Export that template and extract all of the ifIn{OutOctets OIDs and use snmpwalk and snmpget to verify that you're getting the data you want, the mangle the template to provide the number of ports you require. It won't be fun, but it's a great way to learn SNMP on the fly.

        Also make sure you have the MIB saved (in Linux/net-snmp) in /usr/share/snmp/mibs/[MIBfilename].txt and have restarted snmpd.[/QUOTE]

        Comment

        • CeeEss
          Senior Member
          Zabbix Certified Specialist
          • Nov 2007
          • 103

          #5
          Originally posted by troffasky
          This stuff just dies when it doesn't get merged and original volunteer goes away. Haven't got anywhere with the PHP SNMP builder.



          Does this work for you?

          # ./zload_snmpwalk.pl -u zabbix -P dbpass commstring 10051 asawalk3.snmp
          .DBD::mysql::st execute failed: Column 'type' cannot be null at ./zload_snmpwalk.pl line 316, <SWALK> line 1.
          Insert Failure: DBI::st=HASH(0x9bdb468)->strerror



          I get the feeling that SNMP is only grudgingly supported in Zabbix.

          I've been using Zabbix for five years and the answer to 'How to I add X SNMP device to Zabbix?' is the same now as it was back in 2007: 'slowly, patiently and with great difficulty'.
          Exactly the same trip here. When it works, it works well, but creating templates for SNMP devices is the darkest of the black arts. SNMP Bulder is the way forward and i can kind of see why Zabbix isn't adopting it as they'll end up having to deal with every malformed MIB in the universe, but SNMP is absolutely needed for the project to retain its credibility and acquire greater market share, which drives things like support contracts. Things i do really easily in Zabbix would take hours or days in Nagios, but there is a good deal greater amount of SNMP-related info floating around in Nagiosland.

          Comment

          • CeeEss
            Senior Member
            Zabbix Certified Specialist
            • Nov 2007
            • 103

            #6
            Frax, you've jumped into one of several deep ends of Zabbix and the learning curve is going to be steep. You really need to get access to RichLV's Zabbix 1.8 Monitoring book for the section on SNMP. It's also available on Safari Books by subscription. How to build a template from snmp walks is just too complex to attempt to explain here, but zload_snmpwalk should get you off to a start:

            ./zload_snmpwalk -x -R 3 -m All -v 2c [switch_SNMP_RO_community] [switch-model]_t [switch_IP_address] .1.3.6.1.4.1 | tee [switch-model].xml

            You'll end up with a file [switch-model].xml that you can explore, and if you're brave, import and link to your switch host, but it will likely have semantical errors and extraneous objects - that where the fun begins.

            Comment

            • troffasky
              Senior Member
              • Jul 2008
              • 567

              #7
              Originally posted by frax
              Hello,
              thanks for your answer
              I have a lot of doubts...i have the file .mib, how can convert this file in file .txt?
              I'm not too sure it's actually necessary to do anything with the MIBs before you can use them. On a system I have with Zabbix 1.8.4 on Ubuntu, they don't have .txt on the end and adding '-m ALL' to the snmpwalk command successfully turns the numeric OIDs to textual [human readable] ones. I can create an SNMP item against a host in Zabbix and use a textual OID and it works.

              I tried snmpwalk, but doesn't work
              snmpwalk lists all the OIDs it can find on a host , and it's a way of confirming you know the correct SNMP parameters in order to be able to poll data with SNMP. If you can't snmpwalk a device then you're not going to be able to fetch data with SNMP.

              Generally speaking, this should work:

              Code:
              snmpwalk -v2c -c YourCommunity ip.of.dev.ice

              Comment

              • frax
                Junior Member
                • Apr 2012
                • 7

                #8
                Thanks

                Thank you very much for your advices CeeEss!!!Also with the manual is more easy



                Originally posted by CeeEss
                Frax, you've jumped into one of several deep ends of Zabbix and the learning curve is going to be steep. You really need to get access to RichLV's Zabbix 1.8 Monitoring book for the section on SNMP. It's also available on Safari Books by subscription. How to build a template from snmp walks is just too complex to attempt to explain here, but zload_snmpwalk should get you off to a start:

                ./zload_snmpwalk -x -R 3 -m All -v 2c [switch_SNMP_RO_community] [switch-model]_t [switch_IP_address] .1.3.6.1.4.1 | tee [switch-model].xml

                You'll end up with a file [switch-model].xml that you can explore, and if you're brave, import and link to your switch host, but it will likely have semantical errors and extraneous objects - that where the fun begins.

                Comment

                • frax
                  Junior Member
                  • Apr 2012
                  • 7

                  #9
                  Hello troffasky

                  Thanks troffasky, i have tried and it work

                  Originally posted by troffasky
                  I'm not too sure it's actually necessary to do anything with the MIBs before you can use them. On a system I have with Zabbix 1.8.4 on Ubuntu, they don't have .txt on the end and adding '-m ALL' to the snmpwalk command successfully turns the numeric OIDs to textual [human readable] ones. I can create an SNMP item against a host in Zabbix and use a textual OID and it works.



                  snmpwalk lists all the OIDs it can find on a host , and it's a way of confirming you know the correct SNMP parameters in order to be able to poll data with SNMP. If you can't snmpwalk a device then you're not going to be able to fetch data with SNMP.

                  Generally speaking, this should work:

                  Code:
                  snmpwalk -v2c -c YourCommunity ip.of.dev.ice

                  Comment

                  • cirrhus9.com
                    Member
                    • Feb 2012
                    • 58

                    #10
                    frax:

                    TheBook is invaluable.

                    It is laid out/structured such that is really is an exercise in the basics of "how to..." and is really exceptional with the information presented. Each Chapter building upon the previous one.

                    On a Personal Note about "TheBook", it is not a cookie-cutter/recipe to get anything working. Not every item in 42 Templates (a coincidence surely) works on every host.

                    The snmp tools and their usage should be be in one's Linux tool kit.
                    "snmpwalk", "snmpget" and "snmptranslate" should all be in your vocabulary.
                    These are independent tools that can be used independently of Zabbix. I first got acquainted with the subtleties of snmp with Cacti.

                    from a remote "server" (could be your desktop, or Zabbix host...)
                    Code:
                    snmpwalk -v 1 -c public xx.xxx.xx.xxx
                    if that fails, try
                    Code:
                    snmpwalk -v 2c -c public xx.xxx.xx.xxx
                    If that still fails, verify your exposed IP is allowed (firewalls...) on the target.

                    If your IP is allowed and you still can't "walk the target", then then check out
                    /etc/snmp/snmpd.conf
                    on the target, it should tell you everything you need to know or should know to "walk the target"

                    Best of Luck.
                    Last edited by cirrhus9.com; 16-04-2012, 13:40.

                    Comment

                    Working...