Configuring network discovery

When we want to do some automation in our network, the first thing that we have to do is the configuration of the network discovery tool in Zabbix. This way we can detect devices in our network based on some pre-defined settings such as devices with certain services active, pingable, and so on. In this recipe, we will show you how to configure the network discovery tool. Later we will show you how to automate things based on the discovery tool.

Getting ready

For this recipe to work, we need a Zabbix server with an administrator account or a super admin account.

Tip

Before Zabbix 2.4.4 IP range matching was possible by specifying a range like 192.168.1.1-255. That however, was not sufficient for easily specifying multiple subnets.

Since Zabbix 2.4.4 the range option has now been extended to also allow specifying a range like 192.168.1-10.1-255.

How to do it...

  1. Go in the Zabbix menu to Configuration | Discovery.
  2. Click Create discovery rule or edit the existing one.
  3. Give a Name, for example, the name of your network (LAN, DMZ, MGMT).
  4. In the Discovered by proxy box, you can select if you would like the discovery to be done by a proxy.
  5. In the box IP range, we have to put the range of the network that we would like to scan. We can make use of a CIDR notation here such as 192.168.0.1/24, or just as in the example define the range such as 192.168.0.1–254 or we can just add a single IP.
  6. The delay is defined in seconds in the box Delay (in sec) and is the number of seconds Zabbix will initiate a new scan after the first scan is finished.
  7. In the box Checks, we can define certain checks that Zabbix will use for the discovery of the devices on the network.
  8. The Device uniqueness criteria box is where we can select how to make sure we will not have one device multiple times in our discovery list.
  9. Enabled will activate our discovery rule or keep it disabled.
  10. Once you update the details, click on Update to update the rule. Also, in case you have similar rule, then you can use the Clone option to clone and change IP range or other details accordingly.
    How to do it...

How it works

When creating a discovery rule, Zabbix will scan the network range given in our configuration for hosts that can be reached based on our checks that we have defined. For this to work, you need to make sure that the subnet is reachable by Zabbix as the Zabbix server obviously cannot route to networks by itself.

Once a device is discovered, Zabbix will create an event. You can go to Monitoring | Events and select Discovery from the dropdown box under Source on the top right.

There is more…

Since Zabbix 2.2.0, the hosts discovered by different proxies are always treated as different hosts. Discovery will not do much by itself and you would probably want to create some actions later based on the discovery rules you made. It's probably best to keep your discovery rules disabled until your action is created, as actions will be launched once events are generated.

Zabbix will periodically scan the IP ranges that were defined in network discovery rules. The frequency at which Zabbix does this is configurable for each rule individually. However every rule will only use one process.

Remember that the delay in seconds is the amount of time Zabbix will wait to start the next scan once the first scan is finished. This way, you will not initiate too much unneeded traffic on your network.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.47.178