1 Configuring a network discovery rule

    Overview

    • Click on Create rule (or on the rule name to edit an existing one)
    • Edit the discovery rule attributes

    Rule attributes

    All mandatory input fields are marked with a red asterisk.

    A real life scenario

    In this example, we would like to set up network discovery for the local network having an IP range of 192.168.1.1-192.168.1.254.

    In our scenario we want to:

    • discover those hosts that have Zabbix agent running
    • run discovery every 10 minutes
    • add a host to monitoring if the host uptime is more than 1 hour
    • remove hosts if the host downtime is more than 24 hours
    • add Linux hosts to the “Linux servers” group
    • use the template Linux for Linux hosts
    • use the template Windows for Windows hosts
    Step 1

    Defining a network discovery rule for our IP range.

    1 Configuring a network discovery rule - 图3

    The rule will be executed every 10 minutes.

    When this rule is added, Zabbix will automatically start the discovery and generation of the discovery-based events for further processing.

    Step 2

    Defining a discovery for adding the discovered Linux servers to the respective group/template.

    The action will be activated if:

    • the “Zabbix agent” service is “up”
    • the value of system.uname (the Zabbix agent key we used in rule definition) contains “Linux”
    • Uptime is 1 hour (3600 seconds) or more

    1 Configuring a network discovery rule - 图5

    • add the discovered host to the “Linux servers” group (and also add host if it wasn’t added previously)
    • link host to the Linux template. Zabbix will automatically start monitoring the host using items and triggers from the “Linux” template.
    Step 3

    Defining a discovery action for adding the discovered Windows servers to the respective group/template.

    1 Configuring a network discovery rule - 图7

    Step 4

    Defining a discovery action for removing lost servers.

    1 Configuring a network discovery rule - 图9