No announcement yet.

SNMP Timeout errors

  • Filter
  • Time
  • Show
Clear All
new posts

    SNMP Timeout errors

    I have configured an SNMP item to check a cisco switch. The data does not populate, and it gives the error that it times out connecting to the host. I can snmpwalk or snmpget this host with this FQDN from the zabbix server without issue.

    15575:20081211:151214 In get_value(key:.
    15575:20081211:151214 In get_value_snmp(key:., oid:.
    15575:20081211:151214 Standard processing
    15575:20081211:151214 In snmp_normalize(oid:.
    15575:20081211:151214 End of snmp_normalize(result:.
    15575:20081211:151214 In get_snmp(oid:.
    15575:20081211:151214 SNMP [[email protected]:161:161]
    15575:20081211:151214 OID [.]
    15575:20081211:151214 In get_value_SNMP() 0.2
    15575:20081211:151214 In get_value_SNMP() 0.3
    ... snip ...
    15575:20081211:151220 In get_value_SNMP() 0.4
    15575:20081211:151220 In get_value_SNMP() 1
    15575:20081211:151220 Timeout while connecting to []

    Output from snmpwalk

    ]# snmpwalk -v2c -On -c mycom system
    . = STRING: Cisco IOS Software, s72033_rp Software (s72033_rp-IPSERVICESK9_WAN-VM), Version 12.2(33)SXH2a, RELEASE SOFTWARE (fc2)
    Technical Support:
    Copyright (c) 1986-2008 by Cisco Systems, Inc.
    Compiled Fri 25-Apr-08 20:02 by pro
    . = OID: .
    . = Timeticks: (925885317) 107 days, 3:54:13.17

    The configuration of my Item

    Description: SNMP Test
    Type: (tried both SNMPv1 and SNMPv2 agent)
    SNMP community: mycom
    SNMP OID: .
    SNMP port: 161
    Key: .
    Type of information: (tried numeric, text, and character)
    Status: Active

    Let me know if you need any more information.

    Hello Zibbax,

    I think you have the 'key' wrong.
    Try key = sysObjectID.0

    which will probably output this: SNMPv2-SMI::enterprises.9.1.896

    On the other hand, what happens when you snmpwalk .
    Do you get a useful value?

    Disclaimer: All of the above is pure speculation.


      I get:

      SNMPv2-SMI::enterprises.9.1.0 = No Such Object available on this agent at this OID

      Perhaps I am configuring this wrongly.

      Should the OID be the OID of the key, and the key be the name of the OID?

      Wouldn't this be a little redundant?

      #snmpwalk -v2c -c mycom .
      SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.9.1.896

      I currently have it with the . OID, however the error I am getting is an unable to connect to the host. I'll try setting the Key to sysObjectID.0


        That didn't help with the timeout.

        18775:20081212:083034 Timeout while connecting to []
        18775:20081212:083034 Query [update hosts set error='Timeout while connecting to []',disable_until=1229092294 where hostid=100100000010057]


          Originally posted by zibbax View Post
          Should the OID be the OID of the key, and the key be the name of the OID?
          You should be able to snmpwalk the OID and snmpwalk the key and get the same result.

          Are you sure you want to monitor this?

          Sorry, but unfortunately this doesn't help with your timeout problem.

          Disclaimer: All of the above is pure speculation.


            I'm not interested in monitoring that, it's just the first OID. Once I get it to work I can do all the custom triggers, however the problem isn't being able to snmpwalk or snmpget (as user zabbix on the zabbix server), but having zabbix itself get it and not say "Hey, suckah, I can't connect".


              Frustrating isn't it?

              Couple of things you need to check:
              1. Is snmp enabled on the switch? There should be something like this in the switch config
              snmp-server community <> RO

              and possibly

              snmp-server host <ip.of.zabbix-server> version 2c <> udp-port 161

              2. Is the snmp community name correct?

              Q. Why bother trying to set up something that's not worth monitoring? The OID that you're using is, at best, going to return something like 'Cisco Product'. Why not try snmpwalk ifInOctets and get some real values that you might be able to use?

              Check out this post by me to see how I set up monitoring of In/Out Octets:

              Good luck, I hope you get this working soon.

              Disclaimer: All of the above is pure speculation.


                I want to see snmp work with zabbix.

                As I pasted above, the switch has to be working because I can get the snmp data from the switch from the zabbix server from the command line with both snmpwalk and snmpget

                This isn't an issue of gathering relevant data, but being able to gather any data.

                This host is currently monitored by Cacti, so SNMP is working just fine.


                  I know this is probably a stupid question but it's worth checking.

                  In your original ./configure of Zabbix, did you include "--with-net-snmp"?
                  Disclaimer: All of the above is pure speculation.


                    That was included in the compile string.
                    zabbix_server. ZABBIX 1.6.
                    30798:20081219:091816 **** Enabled features ****
                    30798:20081219:091816 SNMP monitoring: YES


                      I'm working with Zibbix on this problem and have come across the following:

                      This zabbix server is configured with HA using a virtual IP. This virtual IP is configured in zabbix.conf with SourceIP=....

                      When Zabbix goes to perform an SNMP poll, it is binding the receive port to this virtual IP, as it should. However, when it sends the request to the switch, the request is being sent using the hosts primary IP, instead of the virtual IP specified in SourceIP. Thus, the request gets to the switch, and the switch responds, but zabbix never hears the response.

                      tcpdump output:
                      16:51:19.090918 IP > C=gxtro GetRequest(28) .
                      16:51:19.092339 IP > C=gxtro GetResponse(37) .
                      16:51:19.092357 IP > ICMP udp port 38208 unreachable, length 87

                      strace of zabbix_server process doing poll:
                      socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 6
                      getsockopt(6, SOL_SOCKET, SO_SNDBUF, [25769930752], [4]) = 0
                      getsockopt(6, SOL_SOCKET, SO_RCVBUF, [25769930752], [4]) = 0
                      bind(6, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr("")}, 16) = 0
                      sendmsg(6, {msg_name(16)={sa_family=AF_INET, sin_port=htons(161), sin_addr=inet_addr("")},....) = 42
                      select(7, [6], NULL, NULL, {0, 999996}) = 0 (Timeout)

                      Is anyone else successfully using SNMP with a configuration using SourceIP?