Ad Widget

Collapse

Zabbix 7.0: Dynamic Host Naming based on disdovery checks

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • andrea.zaccheroni
    Junior Member
    • Sep 2025
    • 1

    #1

    Zabbix 7.0: Dynamic Host Naming based on disdovery checks

    I'm working with Zabbix 7.0 LTS
    and I need some help to achieve a ort of automation that dynamically creates a host and assigns the hostname (or a unique identifier) based on the type of discovery check that succeeds, following a specific priority order.

    The goal is to prevent host duplicates. Here is the logic I thought to implement:
    1. Highest Priority (Zabbix Agent): If a device is found via an agent check, I want to use the system.uname value for the hostname or a visible name.
    2. Medium Priority (SNMP): If an agent is not found but SNMP responds, I want to use the SNMP OID (e.g., 1.3.6.1.2.1.1.1.0) for the hostname.
    3. Lowest Priority (ICMP Ping): If only ping responds, the hostname should be the device's IP address.
    I thought that i could achieve that using a discovery action but the Add host operation does not seem to have fields to set these parameters dynamically.
    Am I following the wrong path? Is there any other way to achieve this?
    I'm open to using API calls if that is the only way to set the host properties dynamically.

    Any guidance or examples would be greatly appreciated.

  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2

    There is no option to choose in action.. you can define additional (agent) checks for discovery and choose to use the result instead of DNS name... discovery action just adds a host based on data coming from discovery...

    Comment

    Working...