Ad Widget

Collapse

SNMP Builder for Zabbix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • elvar
    Senior Member
    • Feb 2008
    • 226

    #61
    Originally posted by modest
    I have the same issue with HP switches and MIB downloaded form HP site.

    However it does get data from HP switches via SNMP when using default Zabbix HP template, so SNMP by itself works.

    Just noticed you are another user having issues with the HP mibs. I can't get it to work with any of the HP mibs either. Have you had any luck yet?

    Comment

    • jhgrc
      Member
      • Jun 2009
      • 52

      #62
      Look promising but does not work for me. Runs very slow. The reason is in the apache error.log, same MIB problems. And I cannot get proposed items by clicking item on the oid view.

      I have downloaded 100% of Cisco MIBs but still get errors.

      Comment

      • richlv
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Oct 2005
        • 3112

        #63
        Originally posted by elvar
        Just noticed you are another user having issues with the HP mibs. I can't get it to work with any of the HP mibs either. Have you had any luck yet?
        hp mibs are quite buggy. try using them with snmpget or walk, and fix any issues they report - maybe that helps.
        Zabbix 3.0 Network Monitoring book

        Comment

        • elvar
          Senior Member
          • Feb 2008
          • 226

          #64
          Originally posted by richlv
          hp mibs are quite buggy. try using them with snmpget or walk, and fix any issues they report - maybe that helps.

          Here is a txt file of the output from running 'snmpwalk -v 2c HOST -c public > hp_procurve_5412-snmpwalk.txt'



          Based on this, does that give you any info as to how to make snmp_builder work correctly?

          Comment

          • nelsonab
            Senior Member
            Zabbix Certified SpecialistZabbix Certified Professional
            • Sep 2006
            • 1233

            #65
            Originally posted by elvar
            Here is a txt file of the output from running 'snmpwalk -v 2c HOST -c public > hp_procurve_5412-snmpwalk.txt'

            http://ooz.net/~elvar/stor/hp_procurve_5412-snmpwalk.txt

            Based on this, does that give you any info as to how to make snmp_builder work correctly?
            It looks like it's just using the standard SNMP MIB's. Did you copy the HP mibs to the directory net-snmp traverses for mibs? I also found the mibs could not be in a sub directory.

            Another option is to call the mib explicitly using the -m option (i think). That will force the loading of that module for the traverse. The module name is not always the filename, you may need to look in the mib file. I'm sorry but I don't recall the string that's used to define the name.
            RHCE, author of zbxapi
            Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
            Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

            Comment

            • elvar
              Senior Member
              • Feb 2008
              • 226

              #66
              Originally posted by nelsonab
              It looks like it's just using the standard SNMP MIB's. Did you copy the HP mibs to the directory net-snmp traverses for mibs? I also found the mibs could not be in a sub directory.

              Another option is to call the mib explicitly using the -m option (i think). That will force the loading of that module for the traverse. The module name is not always the filename, you may need to look in the mib file. I'm sorry but I don't recall the string that's used to define the name.

              Yes, all the HP mibs are in the /usr/share/snmp/mibs dir and not in subdirs. I have not tried specifying the mibs myself though. I'll try and give that a whirl.

              Thanks for the replies!

              Comment

              • elvar
                Senior Member
                • Feb 2008
                • 226

                #67
                Originally posted by nelsonab
                It looks like it's just using the standard SNMP MIB's. Did you copy the HP mibs to the directory net-snmp traverses for mibs? I also found the mibs could not be in a sub directory.

                Another option is to call the mib explicitly using the -m option (i think). That will force the loading of that module for the traverse. The module name is not always the filename, you may need to look in the mib file. I'm sorry but I don't recall the string that's used to define the name.

                Does http://ooz.net/~elvar/stor/HP_ProCur...ing_Order.html provide anything useful for getting snmp_builder to work with the HP mibs? This addon would make life so much easier for me if it worked with HP mibs considering that's about all I need to work with right now snmp wise

                Comment

                • giapnguyen
                  Member
                  • Aug 2009
                  • 33

                  #68
                  Originally posted by elvar
                  Does http://ooz.net/~elvar/stor/HP_ProCur...ing_Order.html provide anything useful for getting snmp_builder to work with the HP mibs? This addon would make life so much easier for me if it worked with HP mibs considering that's about all I need to work with right now snmp wise
                  snmpbuilder work with MIB files to translate SNMP Oid Name into SNMP Oid number. Zabbix work with oid number so it not a problem if your Mibs absent.

                  smpbuilder is nothing but a series of snmp commands. So if snmp commands fails, it fails too.

                  So far, most problem is Mib files and Mib directories.

                  First you must make sure edit first line of snmpbuilder to correct your system setting.

                  define('MIBS_ALL_PATH', '/home/zabbix/public_html/snmp_builder/mibs:/usr/share/snmp/mibs');

                  In my ubutu, default mib path is /usr/share/snmp/mibs but in other system, it's different. Without default mib path, snmptranslate can not lookup predefined snmp values. In my TODOs, I'll try to detect the default path to solve this problem.

                  Second, a MIB may depends on other MIBs so missing included one snmptranslate will fail to work.

                  A simple test, you must try in command prompt:
                  snmptranslate -Ts -M <your mibs_all_path> -m <your mib>

                  If it can list the tree of your mib, it work in my tool.

                  Comment

                  • giapnguyen
                    Member
                    • Aug 2009
                    • 33

                    #69
                    Hey guys, my github's here: http://github.com/giapnguyen/snmpbuilder

                    I checked HP mibs, it's ok but we need nelsonab's patch because in hp mib file, module name not same with file name
                    Last edited by giapnguyen; 19-02-2010, 09:43.

                    Comment

                    • richlv
                      Senior Member
                      Zabbix Certified Trainer
                      Zabbix Certified SpecialistZabbix Certified Professional
                      • Oct 2005
                      • 3112

                      #70
                      Originally posted by nelsonab
                      The module name is not always the filename, you may need to look in the mib file. I'm sorry but I don't recall the string that's used to define the name.
                      for vendor mibs, it rarely is. module name usually is first uncommented string, followed by "DEFINITIONS ::= BEGIN", for example :

                      Code:
                      UPS-MIB DEFINITIONS ::= BEGIN
                      Zabbix 3.0 Network Monitoring book

                      Comment

                      • jhgrc
                        Member
                        • Jun 2009
                        • 52

                        #71
                        I try Cisco ITP MIB, and it seems that snmp_builder.php incorrectly handles indices?

                        No log handling enabled - turning on stderr logging
                        cgspLinkReason: Unknown Object Identifier (Sub-id not found: (top) -> cgspLinkReason)
                        cgspLinkReason."TSF-INSTANCE.TO-TSS-ITP.0": Unknown Object Identifier (Index out of range: "TSF-INSTANCE.TO-TSS-ITP.0 (cgspInstNetwork))
                        USAGE: snmptranslate [OPTIONS] OID [OID]...

                        TSF-INSTANCE.TO-TSS-ITP.0 is oid eccoded into "[len byte].[string in bytes].[len byte2].[string2 in bytes].0"

                        I can see the OID view table, and when I click an entry (cgspLinkReason) for above index, I get the error and nothing shows on item-list.

                        Comment

                        • elvar
                          Senior Member
                          • Feb 2008
                          • 226

                          #72
                          Originally posted by giapnguyen
                          Hey guys, my github's here: http://github.com/giapnguyen/snmpbuilder

                          I checked HP mibs, it's ok but we need nelsonab's patch because in hp mib file, module name not same with file name

                          I will attempt to patch using Nelsonab's code, wish me luck.

                          Comment

                          • giapnguyen
                            Member
                            • Aug 2009
                            • 33

                            #73
                            Originally posted by jhgrc
                            I try Cisco ITP MIB, and it seems that snmp_builder.php incorrectly handles indices?

                            No log handling enabled - turning on stderr logging
                            cgspLinkReason: Unknown Object Identifier (Sub-id not found: (top) -> cgspLinkReason)
                            cgspLinkReason."TSF-INSTANCE.TO-TSS-ITP.0": Unknown Object Identifier (Index out of range: "TSF-INSTANCE.TO-TSS-ITP.0 (cgspInstNetwork))
                            USAGE: snmptranslate [OPTIONS] OID [OID]...

                            TSF-INSTANCE.TO-TSS-ITP.0 is oid eccoded into "[len byte].[string in bytes].[len byte2].[string2 in bytes].0"

                            I can see the OID view table, and when I click an entry (cgspLinkReason) for above index, I get the error and nothing shows on item-list.
                            I'm still work on weird index value. Get new snmp_builder.php from github http://github.com/giapnguyen/snmpbuilder to see it fix your problem. If not please attach your mib.

                            New snmp_builder.php will fix the module name problem. (I don't use Nelsonab code because it parse whole mib file. My code stop when it find module name - it suppose that 1 module in 1 file??? correct me if i'm wrong). HP mib work on my zabbix now

                            It also fix danrog patch for index.
                            Last edited by giapnguyen; 19-02-2010, 12:28.

                            Comment

                            • jhgrc
                              Member
                              • Jun 2009
                              • 52

                              #74
                              Originally posted by giapnguyen
                              I'm still work on weird index value. Get new snmp_builder.php from github http://github.com/giapnguyen/snmpbuilder to see it fix your problem. If not please attach your mib.
                              It does not seem to resolve - here is MIB information from snmp_builder Information tab.



                              CISCO-ITP-GSP-MIB::cgspLinkTable
                              cgspLinkTable OBJECT-TYPE
                              -- FROM CISCO-ITP-GSP-MIB
                              MAX-ACCESS not-accessible
                              STATUS current
                              DESCRIPTION "A table of links for each Signalling

                              I've attached the image (server & community masked) - when I click first row of cgspLinkState (turns yellow) I just get snmptranslate -error to apache's error.log.

                              Is there any way to capture the command line sent to snmptranslate?
                              Attached Files

                              Comment

                              • elvar
                                Senior Member
                                • Feb 2008
                                • 226

                                #75
                                Originally posted by giapnguyen
                                I'm still work on weird index value. Get new snmp_builder.php from github http://github.com/giapnguyen/snmpbuilder to see it fix your problem. If not please attach your mib.

                                New snmp_builder.php will fix the module name problem. (I don't use Nelsonab code because it parse whole mib file. My code stop when it find module name - it suppose that 1 module in 1 file??? correct me if i'm wrong). HP mib work on my zabbix now

                                It also fix danrog patch for index.
                                This fixes my problem with being able to load the HP mibs but I'm not able to actually pull any data with any of the HP mibs. I also tried loading up Fortinet mibs for Fortigate firewalls and I'm not able to get any data using those either. When you tried the HP mibs, did you actually test them on any HP devices by chance? For example, if I load up the HP-MEMPROC-MIB I get nothing returned for anything HP specific. Not sure if I'm doing something wrong but I've tried every possible option under the HP specific sections.

                                Thanks for your continued work on this addon, I appreciate it!

                                Comment

                                Working...