For complex and volatile network environments, Zabbix provides network discovery features that accelerate Zabbix deployments, simplify management maintenance, and greatly reduce the operational pressures for frequently changing deployment environments. The Network Discovery feature does not provide a network topology discovery.
The network Discovery function relies primarily on the following information:
IP range
Availability of services (FTP,SSH,WEB,POP3,IMAP,TCP, etc.)
Information collected by the Zabbix agent (unencrypted mode only)
Information collected by the SNMP agent
We first configure a discoveryrule (Configuration->discovery->creatediscovery rule):
Create a rule:
For the above project detailed description:
Parameters |
Description |
Name |
Name of rule |
Discovery by proxy |
You can choose who will make the Discover,no proxy option to indicate that Zabbix server is discover, and if you select a proxy, then the proxy will do the Discover |
IP Range |
Defines the IP scope of the Dicovery and supports the following range definitions: Individual IP: for example, 192.168.1.1 IP address range: For example, 192.168.0.1-254, the number of IP addresses within the range can not exceed 64K Subnet Mask (CIDR): For example 192.168.0.0/24 (for IPv4, the scope of the mask is/16-/30, for IPV6, the Mask range is/112-/128) List: e.g. 192.168.1.1-255, 192.168.2.1-100, 192.168.2.200, 192.168.4.0/24 Note: from Zabbix 3.0.0, the IP range here supports spaces, lists, and multiline definitions. |
Delay (in SEC) |
Defines the interval at which this rule is executed, and waits until the previous execution has completely ended before the next execution time is calculated, so multiple discovery of the same rule do not overlap |
Checks |
The contents of the check are defined and the port can be defined in the following way: Separate ports: for example 22 Port range: for example 1-1024 List: for example 22,80,40000-60000 |
Device Uniqueness Criteria |
Defines the criteria by which discovery will differentiate the host, for example: If IP address is selected, then when Discovery discovers that a new host's IP is already present, it is not considered a new host |
Enabled |
Whether to enable this rule immediately |
Each discovery check produces the following kinds of event:
Service discovered: When services change from down state to up or first discovered
Service up: A state in which services are continuously up
Service Lost: The state from the up state into down
Service down: A continuous state of being down
Host discovered: The mainframe has changed from down state (all services down) to up (at least one service is up)
Host up: Hosts are in a persistent up state
Host Lost: Hosts change from up to down state
Host down: Hosts continue down state
Note: After Zabbix 2.4.0, the IP range of a host discovered through the network discovery is no longer within the scope of rule, and is immediately removed.
We then use an example to illustrate how to configure a simple Autodiscover host and apply template monitoring.
First create a discoveryrule for the Windows host:
We then create an action based on the network discovery:
To add an action trigger condition:
After defining the discovery of a Windows host, join the host group to the windowshosts, and then apply template OS Windows This template to this host:
After saving, we create a Windows host on this segment and install the zabbixagent (the reason for installing the agent is not for discovery because we detect using only TCP 3389 ports for detection, The agent is installed because the template we are applying may have a monitor that requires the agent to get the data.
Wait less than a minute or so (our discovery interval is 60s), we can see this host (172.16.0.5):
View host 172.16.0.5 has also been applied to the template we have set up for monitoring: