We're working with Zabbix (2.4.7), i'm going to call this the zabbix server. The zabbix server has many machines which it is monitoring. The machines have zabbix agent installed on them.
The machines are actually VMs. We would like to ping the host machine that the vm is running on. The host machines that the vms are running on do not have the zabbix agent installed and we do not have access to those host machines.
The Zabbix server can ping the vms on address 192.168.15.10. The host machine where the vm runs on has an ip address of 192.168.15.5. The third quadrant of the ip changes per vm but the vm is always on .10 address and the host is always on the .5 address.
We would like to create a trigger to say, if the host is pingable but the vm is not, then alert.
I can create the item to ping the vm, but how do i create the item to ping the host? I'd like to add this into the template not add an item per host as we have many vms.
Here's a clearer description:
- We have an auto discovery rule setup to find new vms. So zabbix server has auto detected the vms 192.168.15.10 and 192.168.16.10.
- Zabbix has no knowledge of the host machines 192.168.15.5 and 192.168.16.5 since zabbix agent is not installed on the host machine.
- New vms are added to zabbix, and the correct templates are attached to the new vms.
- We can ping the vms to ensure that it is up.
- Therefore there is an entry for the two hosts in zabbix.
How do we now go about creating a template that can easily be added to each new vm during auto discovery, where the template has an item that pings the host machine on the .5 address, an item that pings the vm on .10 address, and a trigger to say "if host is pingable and vm is not pingable, then trigger an alert"?
As far as i can tell there's no way of setting up a zabbix item to:
- Use the vm ip address
- remove .10
- Add .5
- Now use this new address in the item to ping it