Ad Widget

Collapse

snmpget works but zabbix doesnt

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sg42
    Member
    • Mar 2015
    • 32

    #1

    snmpget works but zabbix doesnt

    Hi!

    I can get some snmp-Values from the commandline (via snmpget or snmpwalk) but when I'm trying this from zabbix I've got only error-messages:


    # snmpget -v1 -c public myhost 1.3.6.1.2.1.31.1.1.1.2.1
    IF-MIB::ifInMulticastPkts.1 = Counter32: 1945661314

    # snmpget -v2c -c public bca-b2 1.3.6.1.2.1.31.1.1.1.2.1
    IF-MIB::ifInMulticastPkts.1 = Counter32: 1945678899

    In zabbix:

    - SNMPv1 agent returned:
    error reason for "myhost:multicast.in" changed: SNMP error: (noSuchName) There is no such variable name in this MIB.

    - SNMPv2 agent returned:
    item "myhost:multicast.in" became not supported: No Such Object available on this agent at this OID
  • Linwood
    Senior Member
    • Dec 2013
    • 398

    #2
    Can you provide the actual item definition, like a screen shot perhaps. My guess is you aren't using the same key exactly, e.g. if it's a discovery the {#SNMPINDEX} might not be right, or similar.

    Comment

    • sg42
      Member
      • Mar 2015
      • 32

      #3
      Here are the sceenshots. One with smnp v1 and one with snmp v2. For the oid I have also tried both: number or name.
      Attached Files

      Comment

      • Atsushi
        Senior Member
        • Aug 2013
        • 2028

        #4
        I cannot see first period in SNMP OID setting.
        Please try change SNMP OID below.

        Code:
        .1.3.6.1.2.1.31.1.1.1.2.1
        The first period is required.

        Comment

        • sg42
          Member
          • Mar 2015
          • 32

          #5
          Now I've tried with beginning Point: the same result:

          item "myhost:multicast.out1" became not supported: No Such Object available on this agent at this OID
          Attached Files

          Comment

          • Atsushi
            Senior Member
            • Aug 2013
            • 2028

            #6
            When you've installed the Zabbix, Did you make using the package?
            If you installed from the source, are you specified SNMP options?

            Please check starting log of Zabbix server.
            My environment displayed message for SNMP below.

            Code:
              1614:20151013:215407.742 ****** Enabled features ******
              1614:20151013:215407.742 SNMP monitoring:           YES

            Comment

            • Linwood
              Senior Member
              • Dec 2013
              • 398

              #7
              I suspect you'd get a different answer without snmp, though worth checking.

              I would suggest the next step is to turn on debugging and see if you can see what is actually happening. That's either done in the config file for the server, or you can do it dynamically in 2.4.x if you are current (see http://blog.zabbix.com/zabbix-2-4-fe...changing/3653/)

              If this is not a production system, you might want to disable all other hosts temporarily while you debug with one host, as looking at the debug log is a bit like drinking from a firehose, huge amounts of data and no way to debug just one host.

              I keep staring at the OID hoping for a missing index or something but it looks right. And you have checked the exact same host with snmpget/walk? As some devices do not have all OID's available (and multicast may well be one of them).

              Try one more thing -- add -On (letter O) to the snmpget, and make sure that it's translating the MIB the same way as you are hard coding in Zabbix. That will show the result with numeric not symbolic OID.

              But if all else fails, run in debug and see what you find. I was banking on a missing index or similar, but nothing jumps out.

              Comment

              • sg42
                Member
                • Mar 2015
                • 32

                #8
                Originally posted by Atsushi
                When you've installed the Zabbix, Did you make using the package?
                If you installed from the source, are you specified SNMP options?

                Please check starting log of Zabbix server.
                My environment displayed message for SNMP below.

                Code:
                  1614:20151013:215407.742 ****** Enabled features ******
                  1614:20151013:215407.742 SNMP monitoring:           YES

                Yes, snmp works on my zabbix. We have more than 200 (snmp)items which works perfect.
                But a few don't ;-(

                Comment

                • sg42
                  Member
                  • Mar 2015
                  • 32

                  #9
                  Originally posted by Linwood
                  I suspect you'd get a different answer without snmp, though worth checking.

                  I would suggest the next step is to turn on debugging and see if you can see what is actually happening. That's either done in the config file for the server, or you can do it dynamically in 2.4.x if you are current (see http://blog.zabbix.com/zabbix-2-4-fe...changing/3653/)

                  If this is not a production system, you might want to disable all other hosts temporarily while you debug with one host, as looking at the debug log is a bit like drinking from a firehose, huge amounts of data and no way to debug just one host.
                  It is a production system, so I guess I have to drink from the firehose ...

                  Originally posted by Linwood
                  I keep staring at the OID hoping for a missing index or something but it looks right. And you have checked the exact same host with snmpget/walk? As some devices do not have all OID's available (and multicast may well be one of them).
                  As written before, the OIDs works with snmpget/snmpwalk but not in zabbix.

                  Originally posted by Linwood
                  Try one more thing -- add -On (letter O) to the snmpget, and make sure that it's translating the MIB the same way as you are hard coding in Zabbix. That will show the result with numeric not symbolic OID.
                  This I've already done:

                  # snmpwalk -v2c -c public myhost IF-MIB::ifOutMulticastPkts.1 -On
                  .1.3.6.1.2.1.31.1.1.1.4.1 = Counter32: 0
                  # snmpwalk -v2c -c public myhost .1.3.6.1.2.1.31.1.1.1.4.1
                  IF-MIB::ifOutMulticastPkts.1 = Counter32: 0

                  I've also tested both (numeric and MIB OID) with snmp v1 and v2.

                  Originally posted by Linwood
                  But if all else fails, run in debug and see what you find. I was banking on a missing index or similar, but nothing jumps out.
                  I will try ...

                  Comment

                  • Linwood
                    Senior Member
                    • Dec 2013
                    • 398

                    #10
                    This is a really dumb thing but I've done it myself so just maybe...

                    Have you tried hard coded IP on the command line or always the name? Maybe you are somehow (bad host entry, bad cached entry) reaching a different host manually than zabbix is? I notice your examples from shell are always names.

                    ((they need a "grasping at straws" smiley" to put here ))

                    Comment

                    • sg42
                      Member
                      • Mar 2015
                      • 32

                      #11
                      First, thanks again for Your support. The problem is only getting stranger ;-(

                      Some general notes:

                      - snmpwalk and zabbix works on other client host
                      - snmpwalk and zabbix works on this client host on other OIDs
                      - snmpwalk works on this OID, regardless of hostname/IP or MIB/numeric OID
                      - zabbix doesn't work on this OID, regardless of MIB/numeric OID

                      I have turned debug on and get this messages:

                      error reason for "myhost:multicast.out" changed: No Such Object available on this agent at this OID
                      error reason for "myhost:multicast.out" changed: SNMP error: noCreation (That table does not support row creation or that object can not ever be created)

                      After turning debug off, my zabbix-server hung and I have to kill the processes manually.

                      I have deleted the items that are not running and will create them new.

                      Comment

                      • aaresmi
                        Junior Member
                        • Aug 2015
                        • 18

                        #12
                        hi,

                        I've the same issue with zabbix 2.4.5 and SNMP getting info of Weblogic 12.1. I write my investigations for if can help.

                        snmpwalk works but zabbix doesn't. I try all but i cannot see why is not working.

                        The debug traces that i get are:
                        33587:20151014:121617.773 In zbx_snmp_process_standard()
                        33587:20151014:121617.773 In zbx_snmp_translate() oid:'.1.3.6.1.4.1.140.625.360.1.60'
                        33587:20151014:121617.773 End of zbx_snmp_translate() oid_translated:'.1.3.6.1.4.1.140.625.360.1.60'
                        33587:20151014:121617.773 In zbx_snmp_get_values() num:1 level:0
                        33587:20151014:121617.774 zbx_snmp_get_values() snmp_synch_response() status:0 s_snmp_errno:0 errstat:0 mapping_num:1
                        33587:20151014:121617.774 In zbx_snmp_set_result() type:128 value_type:4 data_type:0
                        33587:20151014:121617.774 End of zbx_snmp_set_result():NOTSUPPORTED
                        33587:20151014:121617.774 End of zbx_snmp_get_values():SUCCEED
                        33587:20151014:121617.775 End of zbx_snmp_process_standard():SUCCEED
                        33587:20151014:121617.775 In zbx_snmp_close_session()
                        33587:20151014:121617.775 End of zbx_snmp_close_session()
                        33587:20151014:121617.775 End of get_values_snmp()
                        33587:20151014:121617.775 In activate_host() hostid:10136 itemid:26027 type:4
                        33587:20151014:121617.775 End of activate_host()
                        33587:20151014:121617.775 End of get_values():1
                        33587:20151014:121617.775 In DCconfig_get_poller_nextcheck() poller_type:0
                        33587:20151014:121617.775 End of DCconfig_get_poller_nextcheck():1444818227
                        33587:20151014:121617.775 poller #5 [got 1 values in 0.135222 sec, idle 5 sec]
                        33601:20151014:121617.986 history syncer #2 [synced 0 items in 0.000343 sec, syncing history]
                        33601:20151014:121617.986 In DCsync_history() history_first:14 history_num:1
                        33601:20151014:121617.987 In DCmass_update_items()
                        33601:20151014:121617.987 item "webpre-adm_TIENDAS:serverRuntimeState" became not supported: No Such Object available on this agent at this OID
                        33601:20151014:121617.987 In DCadd_nextcheck()
                        33601:20151014:121617.987 End of DCadd_nextcheck()
                        33601:20151014:121617.987 query [txnlev:1] [begin
                        update items set state=1,error='No Such Object available on this agent at this OID' where itemid=26027;
                        end;]

                        The snmpwalk call:
                        snmpwalk -v2c -c public 195.233.178.97:9002 .1.3.6.1.4.1.140.625.360.1.60
                        BEA-WEBLOGIC-MIB::serverRuntimeState.".▒^j?nβ▒▒▒.▒▒*." = STRING: "RUNNING"
                        BEA-WEBLOGIC-MIB::serverRuntimeState."}▒▒Kg▒4..m▒zm<▒▒" = STRING: "RUNNING"
                        BEA-WEBLOGIC-MIB::serverRuntimeState."..K▒bk▒ ▒;.▒W▒>." = STRING: "RUNNING
                        "

                        I did a tcpdump too at dst serverort and this is the result:
                        +.......q.h.<..H...a.F#*.8..0......public.!..s.Ms. .....0.0.. => This was the zabbix request. This not work
                        +.......q.h.<..H...a."#*.8..0......public.!..pI... .....0.0.. => This was the snmpwalk request. This work

                        Thanks

                        Comment

                        • Linwood
                          Senior Member
                          • Dec 2013
                          • 398

                          #13
                          Any chance you have wireshark or something that will decode the two SNMP requests to see what is actually different?

                          That the whole packet is different is not surprising, but am curious about the payload (but I'm too lazy to try to look up how to decode it in ascii). I had some similar issues with polling a 32 bit integer which had flipped past signed into unsigned - snmpwalk woudl work (sort of), and zabbix would not. My fix was to find a better MIB which labeled it Counter32 instead of Integer (I do not suggest that is your problem, just that there are differences, and I suspect someone may have to dig into the code to find out what).

                          Comment

                          • sg42
                            Member
                            • Mar 2015
                            • 32

                            #14
                            I will try a tcpdump

                            Comment

                            • sg42
                              Member
                              • Mar 2015
                              • 32

                              #15
                              Error Found

                              Thanks for Your help. I found the error at last: the machine which I'm testing has two ethernet-interfaces (it's a blade-server in a blade-chassi). Some snmp values go on the management interface some on the regular interface.
                              So when testing via snmpget I'm using the right interface but in zabbix I have configured the wrong interface.
                              I've seen this, when a tcpdump shows no traffic while zabbix gets its answers.
                              Thanks again for Your help.

                              Comment

                              Working...