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:
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.
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:
- 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.
- 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.
- Lowest Priority (ICMP Ping): If only ping responds, the hostname should be the device's IP address.
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.
Comment