Ad Widget

Collapse

SNMP timeout while connecting to [x.x.x.x:161] for some hosts (zabbix 1.1)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Philippe
    Member
    • Oct 2004
    • 77

    #1

    SNMP timeout while connecting to [x.x.x.x:161] for some hosts (zabbix 1.1)

    hello,

    i use zabbix 1.1 and i am monitoring some cisco switches with snmp.
    i had this configuration in a working 1.0 configuration where i monitor the CPU and freemem.
    now, i made a new template in 1.1 with that same OID configuration as in my 1.0 and the strange thing is that for the most switches i see an error in configuration ==> hosts: Timeout while connecting to [x.x.x.x:161]

    It works great for some other switches, all are cisco so i know the configuration is good (template the same for all switches) so what is going on ?
    It works great in zabbix 1.0 so the configuration of the switches is also okay (even checked it again).

    i configured zabbix with:
    $ ./configure --enable-server --with-mysql --with-net-snmp


    in zabbix_server.log i get:
    009529:20060613:135258 Getting value of [lmemFreeMem] from host [WD_3550] failed
    009529:20060613:135258 The value is not stored in database.
    009529:20060613:135258 SNMP error [1]

    and when i perform a manual snmpwalk to one of the problem switches, i get the result that i need so snmp is working fine.


    any idea ?
    grtz and thnx,
    Verus.
    Last edited by Philippe; 13-06-2006, 14:14.
  • Philippe
    Member
    • Oct 2004
    • 77

    #2
    it working now, had a problem with some switches...

    thnx anyway.
    grtz,
    Verus

    Comment

    • stever
      Member
      • Jun 2006
      • 36

      #3
      What did you do to fix this

      Hi -

      I'm getting the same network timeout error. What switches did you change to get this working?

      Edit: In looking a little closer, when I turn on debug the logs show that it is trying to connect to public@(ipaddr):161, but I have specified our community string in the config - why is it not picking this up?

      (And just to clarify: I am able to query the device with snmpget from my zabbix server, using both v1 and v2. I built zabbix --with-net-snmp, and defined the hosts with ip and port 161 as laid out in the documentation. Connectivity and server speed are not an issue. Zabbix itself is running fine )
      Last edited by stever; 16-06-2006, 06:26. Reason: adding info

      Comment

      • stever
        Member
        • Jun 2006
        • 36

        #4
        Fixed it, found bug

        Well, it looks like the snmp community doesn't get properly set through the web interface, and it stores the default 'public' in the database. I updated the DB row, and checks are working fine now.

        I will log a bug over at sourceforge.

        Comment

        • georgew
          Member
          • Mar 2008
          • 50

          #5
          community string refuses to be set

          I'm seeing the same problem. I'm using a non-default community string, and zabbix will not allow me to set it.

          Is there a way to change the default community string, so that zabbix can use the default, and not have it be "public"? I can set it to my standard community string and be done with it.

          Obviously the web interface is just buggy...


          George

          Comment

          • jroberson
            Senior Member
            • May 2008
            • 124

            #6
            I've never had a problem setting my community settings in the frontend. If you are using templates you will not be able to change a single host's community string vs all of the hosts associated with that template. If you have multiple communities you will need to make multiple templates. If you have a large quantity of communities you need to change in a host or template, you can use the export feature, find and replace the community string in the exported XML file, and then import it back over the existing one.

            Comment

            • georgew
              Member
              • Mar 2008
              • 50

              #7
              I tried to use the SNMP templates, and the community string in them cannot be changed, I'm not sure I understand why this is.

              When I created my own items, it allowed me to set the community string, but my queries were never processed.

              I tried the mass update function, and it said it changed the strings, but it did nothing.

              So finally I gave up on the user interface, and went in and use sql to fix the problem. That worked like a charm! In 1 second I changed 6000+ instances of "public" into the desired string for my network. Suddenly the templates work, AND my custom items are working too.

              My solution is similar to your export-as-xml-and-edit approach. I guess my confusion was over the inflexibility of the templates. I thought you could apply a template, and customize it for the host you were pointing it at. I see now that I need to make templates that are complete with configuration variables. That was a leap of understanding that make me productive finally. It makes the pre-configured templates somewhat non-useful for me, but that's ok as I need to make my own templates anyway.

              I'm learning as I work through the issues, and now that I understand, I like zabbix even more. I would have implemented templates differently, but I can work with what we have here, so I'm not going to complain any more... At least about THAT...
              Last edited by georgew; 12-05-2009, 21:21.

              Comment

              • MrKen
                Senior Member
                • Oct 2008
                • 652

                #8
                Originally posted by georgew
                I tried to use the SNMP templates, and the community string in them cannot be changed, I'm not sure I understand why this is.

                When I created my own items, it allowed me to set the community string, but my queries were never processed.

                I tried the mass update function, and it said it changed the strings, but it did nothing.
                What??? Sure you can update the info on Templates.

                In configuration of items, be sure to select the Template not the host it is attached to. But even if you were to select the specific host, in the Description column it will show the attached Template in gray - you can click on the gray part and it will automatically change over to the Template where you can make any changes that you want. Including changing the snmp community!

                In June 2006, stever (post 4 above) claims to have reported a bug. I don't know, but I'm sure that if there was a bug it would have been fixed by now.

                MrKen
                Disclaimer: All of the above is pure speculation.

                Comment

                • georgew
                  Member
                  • Mar 2008
                  • 50

                  #9
                  I see... When you are looking at the items under the host, the templates cannot be altered, but when you look at the template directly, it can be... Makes sense...

                  The brute force of using sql commands is sort of like the old saying: "if the only tool you have is a hammer, all of the problems look like nails".

                  Ok, I know I'm just being dense, but how do I look at the templates to edit them? When I look at items, and select the group "templates" it still only shows items associated with hosts. What you are telling me makes perfect sense, but I'm not finding the templates...

                  Oh, wait... I wasn't being patient enough. I went to the items screen, selected the group templates, and it still had just the hosts listed... I left it alone for a while, and came back, and this time is had 4988 items displayed, and in the host column, they were listed as templates.

                  I had looked at that before, but I had never given the page time to load I guess.

                  Comment

                  • dantony79
                    Junior Member
                    • Aug 2010
                    • 12

                    #10
                    error: Timeout while connecting to [x.x.x.x:161]

                    Hello all,

                    any idea what is the fix for this.

                    snmp v1 does not work for cisco 2960 switches and RHEL servers.

                    snmpd and snmptrapd are started and with community name as "public" on RHEL servers.

                    I've tried on both zabbix 1.8.1 and 1.8.3 bit no luck yet.

                    any sort of help is really appreciated.

                    :-)
                    Dinil

                    Comment

                    Working...