Ad Widget

Collapse

Autodiscovery/Network Discovery

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cerasus
    Junior Member
    • Mar 2020
    • 24

    #1

    Autodiscovery/Network Discovery

    Hi I have a question about network discovery an answer to which I haven't been able to find anywhere yet.


    I would like to use network discovery as described here (https://www.zabbix.com/documentation...work_discovery), but there's one crucial problem (?) with it: speed. In my tests where I deployed a zabbix server in a dockerized environment, it took 4-6 seconds per IP. If the we're talking a /16 network, it will take 5 days (((2^16) * 6) / 86400) to scan it with the single threaded discoverer process. That's not great because in my case I have dozens of those /16 networks.

    So, my question is, do I understand correctly that it takes that long? Is there a way to mitigate this?

    The other alternative I see is https://www.zabbix.com/documentation...o_registration but the problem with this approach is that the rules for autoregistration are evaluated only at the time of the agent's registration. If, for example, I later accidentally detach a host from a template, Zabbix will not fix that for me next time the agent reports itself. The registration is over at that point and the rules will not be enforced. With network discovery, according to my tests, all the rules are replayed when a host is found during the next scan. But again, it's impractically slow.

    Am I missing something simple or is there a better option besides those two options?

    Thanks!!
  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2
    Since the scanning of a single range is performed by a single process, the solution to speed up network discovery is to divide the range of addresses /16 into several and make several network discovery.

    Comment

    • cerasus
      Junior Member
      • Mar 2020
      • 24

      #3
      Hi, thanks for your response!

      That's good news (kind of). I didn't realize it's 1 thread per rule. But is my calculation correct otherwise?

      If there's one thread per rule, I can create as many rules and networks but if the conditions within each rule will need to be duplicated, that's not good. What would be a way to reduce this duplication?

      Comment

      • cerasus
        Junior Member
        • Mar 2020
        • 24

        #4
        But more importantly, I'm not seeing two discoverer processes running simultaneously with two separate discovery rules setup

        Each network range is processed sequentially according to the the discoverer logs. I set up two ranges: 172.16.18.0-10 and 172.16.19.0-10

        I see lines like this:

        zabbix-server | 284:20200303:154133.807 In process_rule() rule:'172.18.0.0-10' range:'172.18.0.0-10'
        ...all 172.18 ips are tried here...
        zabbix-server | 284:20200303:154154.902 In process_rule() rule:'172.19.0.0-10' range:'172.19.0.0-10'
        ...all 172.19 ips are tried here...

        So, I'm not seeing simultaneous scanning.

        Comment

        • tim.mooney
          Senior Member
          • Dec 2012
          • 1427

          #5
          Originally posted by cerasus
          But more importantly, I'm not seeing two discoverer processes running simultaneously with two separate discovery rules setup
          What do you have set for "StartDiscoverers" in your zabbix_server.conf? It probably defaults to just 1.

          Comment

          • cerasus
            Junior Member
            • Mar 2020
            • 24

            #6
            Wow, I wasn't aware of that setting! Yeah, that will help things a LOT. I will test today or tomorrow but this is huge. I'm not setting it to anything currently, so it must be defaulting to 1 according to this: https://www.zabbix.com/documentation...abbix_server?s[]=startdiscoverers

            Thanks a ton for making me aware!

            Comment

            • poxeron
              Member
              • Sep 2020
              • 52

              #7
              Originally posted by cerasus
              But more importantly, I'm not seeing two discoverer processes running simultaneously with two separate discovery rules setup

              Each network range is processed sequentially according to the the discoverer logs. I set up two ranges: 172.16.18.0-10 and 172.16.19.0-10

              I see lines like this:

              zabbix-server | 284:20200303:154133.807 In process_rule() rule:'172.18.0.0-10' range:'172.18.0.0-10'
              ...all 172.18 ips are tried here...
              zabbix-server | 284:20200303:154154.902 In process_rule() rule:'172.19.0.0-10' range:'172.19.0.0-10'
              ...all 172.19 ips are tried here...

              So, I'm not seeing simultaneous scanning.
              cerasus , how you get this rows ?

              Comment

              Working...