Ad Widget

Collapse

SNMP issue on Juniper SRX

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cknight
    Junior Member
    • Nov 2014
    • 7

    #1

    SNMP issue on Juniper SRX

    I have a Juniper SRX240 that I configured SNMP on with the appropriate community string. I can execute an SNMP walk from the Zabbix server, but Zabbix continues to say "Timeout while connecting to..." I have checked and double-checked that the community string is correct. I'm using the {$SNMP_COMMUNITY} macro on the host, and all of the SNMP checks have {$SNMP_COMMUNITY} for the community string. This is the same setup I use for other SNMP hosts.

    Any further troubleshooting steps I can try? I've restarted the zabbix-server service and checked the logs, but I didn't find much. Thanks!
  • aib
    Senior Member
    • Jan 2014
    • 1615

    #2
    Increase the Timeout=30 settings in zabbix-server.conf file and restart server again.
    Maybe your Juniper wait too long before answer to zabbix.
    Sincerely yours,
    Aleksey

    Comment

    • cknight
      Junior Member
      • Nov 2014
      • 7

      #3
      Thanks for the suggestion. There was no timeout value defined, so I added one. I initially did 15, then upped it to 30 when it didn't help. I restarted zabbix-server after each change.

      Is there more logging or debugging I can do? The zabbix_server.log file didn't provide much information. Are we able to see what commands Zabbix is sending to make sure they aren't malformed?

      Comment

      • aib
        Senior Member
        • Jan 2014
        • 1615

        #4
        Sorry for confusing you, but real name of configuration file is little bit different:
        Code:
        # ls -la /etc/zabbix/zabbix_server.conf
        -rw-r----- 1 root zabbix 13262 Dec 17 13:17 /etc/zabbix/zabbix_server.conf
        Also, in that configuration file you can change the level of log - from zero(0) to Debug(4)
        Code:
        ### Option: DebugLevel
        #       Specifies debug level
        #       0 - basic information about starting and stopping of Zabbix processes
        #       1 - critical information
        #       2 - error information
        #       3 - warnings
        [B]#       4 - for debugging (produces lots of information)[/B]
        #
        # Mandatory: no
        # Range: 0-4
        # Default:
        DebugLevel=3
        Don't forget to change it down to 3(default) after debugging, and restart the server every time when you change the configuration.
        Sincerely yours,
        Aleksey

        Comment

        • cknight
          Junior Member
          • Nov 2014
          • 7

          #5
          Thanks. I was editing the correct file. I turned up debugging and found this:

          Code:
           21703:20141219:152145.927 SNMP [[email protected]:161]
           21703:20141219:152215.959 getting SNMP values failed: Timeout while connecting to "172.16.1.16:161".
           21703:20141219:152215.959 query [txnlev:1] [update hosts set snmp_available=2,snmp_disable_until=1419020595,snmp_error='Timeout while connecting to "172.16.1.16:161".' where hostid=10146]
          So it's trying to use an incorrect SNMP community (public). I'll dig into where that's coming from. Thanks for the tips!

          Comment

          • aib
            Senior Member
            • Jan 2014
            • 1615

            #6
            First of all, check tab Macros in Host configuration.
            Code:
            Macro:                         -> Value
            {$SNMP_COMMUNITY} -> not_public_snmp_community
            Then, for each Item check that they are using Macros instead of plain "public"
            Code:
            SNMP community: {$SNMP_COMMUNITY}
            And at the final, check Discovery prototype - sometimes they was created by lazy administrators who use plain "public" instead of correct macros in Item prototypes configuration.
            Sincerely yours,
            Aleksey

            Comment

            • cknight
              Junior Member
              • Nov 2014
              • 7

              #7
              That's exactly what I checked. The template I'm using originally had public for the community string, so I had to delete it, fix the XML file and reimport. On a whim, I deleted the host and readded it. It works now! I guess something got stuck somewhere still using public.

              Thanks for all of your help!

              Comment

              • aib
                Senior Member
                • Jan 2014
                • 1615

                #8
                Good for you!
                Sincerely yours,
                Aleksey

                Comment

                • kloczek
                  Senior Member
                  • Jun 2006
                  • 1771

                  #9
                  Originally posted by cknight
                  I have a Juniper SRX240 that I configured SNMP on with the appropriate community string. I can execute an SNMP walk from the Zabbix server, but Zabbix continues to say "Timeout while connecting to..." I have checked and double-checked that the community string is correct. I'm using the {$SNMP_COMMUNITY} macro on the host, and all of the SNMP checks have {$SNMP_COMMUNITY} for the community string. This is the same setup I use for other SNMP hosts.

                  Any further troubleshooting steps I can try? I've restarted the zabbix-server service and checked the logs, but I didn't find much. Thanks!
                  I'm observing the same issue on NetApps, Big5 deveces. Seems in both causes as SNMP agent is used some version of net-snmp software and IIRC the same is on Junipers.
                  Looks like it is some generic problem with SNMP agents bases on this project.
                  Sometimes SNMP queried takes fraction of the second but sometimes waaaaay longer.
                  http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
                  https://kloczek.wordpress.com/
                  zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
                  My zabbix templates https://github.com/kloczek/zabbix-templates

                  Comment

                  • aib
                    Senior Member
                    • Jan 2014
                    • 1615

                    #10
                    Just from the top of my head: once upon a time I had the problem with slow SNMP response.
                    It happens because DNS didn't configured properly on one of my devices.
                    I have no idea why it affect on SNMP - but after correct configuration my SNMP request started to get answer immediately after I hit "Enter"
                    Sincerely yours,
                    Aleksey

                    Comment

                    Working...