Ad Widget

Collapse

Unable to get info from snmp : "snmp_build" error in log file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • raphaelk
    Junior Member
    • Jun 2012
    • 3

    #1

    Unable to get info from snmp : "snmp_build" error in log file

    Hi,

    I'm quite new in zabbix world ; I've installed the 2.0 version on ubuntu server 64bits. I've added some netgear snmp device, with Template SNMP Generic, Template SNMP Interfaces template. In configuration / host menu, The SNMP icon is red for all the devices and in the /tmp/zabbix_server.log :

    MIB search path: /root/.snmp/mibs:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp
    Cannot find module (SNMPv2-MIB): At line 0 in (none)
    snmp_build: unknown failures

    Any clues ?

    regards,

    /R
  • herta
    Senior Member
    • Sep 2011
    • 101

    #2
    What does your snmp.conf look like? (Run "net-snmp-config --snmpconfpath" to see where it might reside.)

    Comment

    • raphaelk
      Junior Member
      • Jun 2012
      • 3

      #3
      Hi Herta !

      My /etc/snmp/snmp.conf is empy !

      Code:
      #
      # As the snmp packages come without MIB files due to license reasons, loading
      # of MIBs is disabled by default. If you added the MIBs you can reenable
      # loaging them by commenting out the following line.
      mibs :
      I was not aware that something should be done, snmpwalk works well from my Zabbix server.

      Raphael.

      Comment

      • herta
        Senior Member
        • Sep 2011
        • 101

        #4
        Try this (for other readers: this works on Ubuntu 12.04. I currently don't run other linux flavours.)

        * if you haven't done so yet, install snmp and snmp-mibs-downloader:

        # apt-get install snmp snmp-mibs-downloader

        This should also download the MIBs. If not, run "download-mibs" once more.

        * If you need additional MIBs, find out which directories net-snmp searches for new mibs. E.g.,

        # net-snmp-config --default-mibdirs
        /root/.snmp/mibs:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp

        * copy the additional MIBs to one of those directories. E.g.,

        # if [ ! -d /usr/share/mibs/site ]; then
        mkdir /usr/share/mibs/site
        chmod 755 /usr/share/mibs/site
        fi
        # cd /usr/share/mibs/site
        # wget ftp://ftp.cisco.com/pub/mibs/v2/ENTITY-MIB.my \
        ftp://ftp.cisco.com/pub/mibs/v2/IF-MIB.my \
        ftp://ftp.cisco.com/pub/mibs/v2/CISCO-SMI.my \
        ftp://ftp.cisco.com/pub/mibs/v2/CISCO-PRODUCTS-MIB.my \
        ftp://ftp.cisco.com/pub/mibs/v2/CISCO-TC.my

        * find out where the snmp config file resides. E.g.,

        # net-snmp-config --snmpconfpath
        /etc/snmp:/usr/share/snmp:/usr/lib/snmp:/root/.snmp:/var/lib/snmp

        * edit /etc/snmp/snmp.conf and add the mibs you want to use. E.g.,

        mibs +SNMPv2-SMI
        mibs +SNMPv2-TC
        mibs +SNMPv2-MIB
        mibs +RFC1213-MIB
        mibs +IF-MIB
        mibs +ENTITY-MIB
        mibs +CISCO-SMI
        mibs +CISCO-PRODUCTS-MIB
        mibs +CISCO-TC

        The order in which you add them is important, as MIBs can be dependent on other MIBs.
        You can specify "ALL" here, but if your MIB directories contain a lot of them, that will just slow down processing them.

        * restart zabbix_server

        If you still have errors,
        - check your community string (note that you may also wish to adjust the {$SNMP_COMMUNITY} macro (Administration -> General -> Macros)
        - double check the OID you are using

        Comment

        • raphaelk
          Junior Member
          • Jun 2012
          • 3

          #5
          Thx for your quick answer : it seems that the agt-get install snmp-mibs-downloader solve the issue !

          I have now a green icon for my netgear switch with snmp Template SNMP Generic, Template SNMP Interfaces attached. I can have a graph with uptime.

          Next is the manage to get port traffic graph, and cpu, mem info.

          As you can see, I'm sure I miss some setting regarding SNMP.

          What is your advices to achieve this goal for monitoring the port usage ?

          I red something about the snmp builder (http://www.zabbix.com/wiki/howto/mon...p/snmp_builder) but I wonder if buidling my own template would be enough as it seems that some MIB needs to be present on the server.

          Again thanks for your help / time !

          Raphael.

          Comment

          • herta
            Senior Member
            • Sep 2011
            • 101

            #6
            If you type "netgear mib" and "netgear switch mib" in your favorite browser, you should find a number of links where you can download Netgear-MIB and NETGEAR-SWITCHING-MIB. I suspect you'll need those. (We don't use netgear, and I'm not familiar with them.)

            Just follow the procedure outlined in my previous reply to put them on your system and in the snmp.conf.

            I didn't know snmp-builder, but I just installed it and it looks nice. It will help you to create a zabbix template from the MIBs on your system. Haven't worked it out entirely yet (e.g., how to use it to define items for all interfaces on an snmp device isn't clear to me at the moment), but I'll take another look on Monday.

            If you're looking for the latest version, go to http://87.110.183.172/forum/showthre...=15088&page=23 and look at replies #229 - #231.

            Comment

            • Ishan
              Member
              • May 2013
              • 40

              #7
              Hello herta

              I am using a CentOS 6.5, Whats the command for CentOS to install snmp-mib-downloader?

              Please help me to fix that.

              Thanks
              Ishan

              Comment

              • Alfista
                Senior Member
                • Mar 2017
                • 136

                #8
                Hi,

                I use the pre installed appliance from zabbix and I have the same error:
                .Cannot find module (SNMPv2-SMI): At line 38 in /usr/share/snmp/mibs/LSI-AdapterSAS mib Cannot find module (SNMPv2-SMI): At line 38 in /usr/share/snmp/mibs/LSI-AdapterSAS.mib

                I have installed mib downloader and also snmp, but when I try to use the command net-snmp-config, the command isn't found. And all additional mibs I have are in /usr/share/snmp/mibs/ and also added in the /etc/snmp/snmp.comf

                Please can you help me?
                Thanks.

                Comment


                • Alfista
                  Alfista commented
                  Editing a comment
                  This I have done it as a first part (it's preinstalled, i only downloaded the mibs), but also have this error and missing command.
                  Can it be linked with the problem - when I try to check Zabbix snmp over snmpwalk, it will not work, its time out, even I have all set corectly? This isn't the first device controled over SNMP, so I know that all configs are set corectly.
              Working...