Ad Widget

Collapse

Discover all devices on a subnet

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dolevb
    Junior Member
    • Jun 2015
    • 3

    #1

    Discover all devices on a subnet

    Hi,

    I'm new to Zabbix, and I'm trying to discover all devices on a specific subnet.
    I edited the out-of-the-box discovery rule "Local network", changed the IP range to "10.2.30.0/24", added ICMP and SNMP checks (161, public, 1.3.6.1.2.1.1.5), and enabled the rule.

    My questions:
    1. How can I know when the discovery was last executed?
    2. Where do I see the discovery results?
    On Monitoring->Discovery it says "No discovered devices found."
    I definitely have devices on this subnet, and they are responsive to both ping and SNMP get.

    Thanks,
    Dolev
  • dolevb
    Junior Member
    • Jun 2015
    • 3

    #2
    Anyone??
    I'm really stuck here.

    Comment

    • acropia
      Junior Member
      • Mar 2015
      • 26

      #3
      Discovery consists of two parts:
      1. Configuration / Discovery / Discovery rules
      2. Configuration / Actions / Discovery / Actions


      First you create a Discovery Rule. In the IP-range you fill in a range which Zabbix will loop through every 'Delay'-period. Depending on the Started Discovery Pollers, this is about one IP per second (excl. calculations).
      So keep your Delay at 2xIPs at a minimim. For a 24-bits mask this is 254 IP-addresses to scan, so the minimum Delay would be about 500 secs.
      Then the Checks are the ways Zabbix will try to connect to the host. ICMP and Zabbix will be sufficient for servers with an agent. SNMP will be required for agentless SNMP discovery (switches, routers, etc.)

      The next thing you need to configure is a Discovery Action. Mind the selectbox in the right upper corner on Configuration / Actions!

      The Discovery Rule you created on step 1 scans the network, nothing more than that. With a Discovery Action you decide what to do when the Discovery Rule hits an active host.

      For example: Name it like your subnet (ie: Subnet 10.2.30.0). Then put in some conditions like:
      • Discovery status = Up
      • Service type = Zabbix agent
      • Host IP = 10.2.30.1-254


      If the hitted host will match these conditions, then the given Operations are executes, for example:
      • Add to host group: Discovered 10.2.30.0 hosts
      • Link to templates: OS Linux


      Then your questions.

      You cannot see in the GUI when a particular discovery has run the last time. But you can do it by CLI on your Zabbix Server of Zabbix Proxy.

      Open up a shell to your Zabbix Server and edit the server config to enable DebugLevel=4. On my CentOS Linux machine this is:
      Code:
      vi /etc/zabbix/zabbix_server.conf
      Now edit the option DebugLevel and set it to 4:
      Code:
      DebugLevel=4
      Now restart your service:
      Code:
      systemctl restart zabbix-server
      With a tail-command on your debug logfile you can now see the discovery running:
      Code:
      tail -f /var/log/zabbix/zabbix_server | grep -i disc
      If a Discovery Rule hits an active host (by it's Discovery Rule Checks), it will be reported under Monitoring / Discovery. When it also executed a Discovery Action to add the host, that record will be shown on the same page, inside the field 'Monitored Host'.

      Keep us posted!

      Comment

      • dolevb
        Junior Member
        • Jun 2015
        • 3

        #4
        Thank you for the detailed and enlightening answer.

        Viewing the discovery logs, I found out that I need to use OID "1.3.6.1.2.1.1.5.0" instead of "1.3.6.1.2.1.1.5" in order for devices to respond successfully to an SNMP poll.
        Now it works fine, and I even got Zabbix to discover the devices' interfaces.

        Comment

        • azer1020
          Junior Member
          • May 2021
          • 2

          #5
          Is it possible to discover all Windows PC without windows agent installed ?

          Comment

          • SalDiaz
            Junior Member
            • Apr 2023
            • 5

            #6
            Originally posted by azer1020
            Is it possible to discover all Windows PC without windows agent installed ?
            In my few experience, is not possible without SNMP settings on every computer from your network

            Comment

            Working...