Announcement

Collapse
No announcement yet.

SNMP Timeout errors

Collapse
X
  • 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:.1.3.6.1.4.1.9.1.896)
    15575:20081211:151214 In get_value_snmp(key:.1.3.6.1.4.1.9.1.896, oid:.1.3.6.1.2.1.1.2.0)
    15575:20081211:151214 Standard processing
    15575:20081211:151214 In snmp_normalize(oid:.1.3.6.1.2.1.1.2.0)
    15575:20081211:151214 End of snmp_normalize(result:.1.3.6.1.2.1.1.2.0)
    15575:20081211:151214 In get_snmp(oid:.1.3.6.1.2.1.1.2.0)
    15575:20081211:151214 SNMP [[email protected]:161:161]
    15575:20081211:151214 OID [.1.3.6.1.2.1.1.2.0]
    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 [myswitch.gxt.com:161]

    Output from snmpwalk

    ]# snmpwalk -v2c -On -c mycom myswitch.domain.com system
    .1.3.6.1.2.1.1.1.0 = STRING: Cisco IOS Software, s72033_rp Software (s72033_rp-IPSERVICESK9_WAN-VM), Version 12.2(33)SXH2a, RELEASE SOFTWARE (fc2)
    Technical Support: http://www.cisco.com/techsupport
    Copyright (c) 1986-2008 by Cisco Systems, Inc.
    Compiled Fri 25-Apr-08 20:02 by pro
    .1.3.6.1.2.1.1.2.0 = OID: .1.3.6.1.4.1.9.1.896
    .1.3.6.1.2.1.1.3.0 = 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: .1.3.6.1.2.1.1.2.0
    SNMP port: 161
    Key: .1.3.6.1.4.1.9.1.896
    Type of information: (tried numeric, text, and character)
    Status: Active


    Let me know if you need any more information.

    #2
    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 .1.3.6.1.4.1.9.1.896
    Do you get a useful value?

    MrKen
    Disclaimer: All of the above is pure speculation.

    Comment


      #3
      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 myswitch.domain.com .1.3.6.1.2.1.1.2.0
      SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.9.1.896


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

      Comment


        #4
        That didn't help with the timeout.

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

        Comment


          #5
          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? http://support.ipmonitor.com/mibs_by....4.1.9.1.896#h

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

          MrKen
          Disclaimer: All of the above is pure speculation.

          Comment


            #6
            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".

            Comment


              #7
              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 <your.community.name> RO

              and possibly

              snmp-server host <ip.of.zabbix-server> version 2c <your.community.name> 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: http://www.zabbix.com/forum/showthread.php?t=11313


              Good luck, I hope you get this working soon.

              MrKen
              Disclaimer: All of the above is pure speculation.

              Comment


                #8
                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.

                Comment


                  #9
                  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.

                  Comment


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

                    Comment


                      #11
                      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 172.29.252.2.38208 > 192.168.255.240.snmp: C=gxtro GetRequest(28) .1.3.6.1.2.1.1.2.0
                      16:51:19.092339 IP 192.168.255.240.snmp > 172.29.252.2.38208: C=gxtro GetResponse(37) .1.3.6.1.2.1.1.2.0=.1.3.6.1.4.1.9.1.896
                      16:51:19.092357 IP 172.29.252.2 > 192.168.255.240: ICMP 172.29.252.2 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("172.29.252.1")}, 16) = 0
                      sendmsg(6, {msg_name(16)={sa_family=AF_INET, sin_port=htons(161), sin_addr=inet_addr("192.168.255.240")},....) = 42
                      select(7, [6], NULL, NULL, {0, 999996}) = 0 (Timeout)



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

                      Comment

                      Working...
                      X