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 The host machine where the vm runs on has an ip address of 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:

Image showing zabbix server connected to two vms but not the hosts that the vms run in

  1. We have an auto discovery rule setup to find new vms. So zabbix server has auto detected the vms and
  2. Zabbix has no knowledge of the host machines and since zabbix agent is not installed on the host machine.
  3. New vms are added to zabbix, and the correct templates are attached to the new vms.
  4. We can ping the vms to ensure that it is up.
  5. 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:

  1. Use the vm ip address
  2. remove .10
  3. Add .5
  4. Now use this new address in the item to ping it

Apparently host prototypes can help with this, but I couldn't get my head around host prototypes, so the approach taken was to use external checks:

  1. Create a bash script that zabbix can run against all the vms
  2. Bash script takes the vm ip address as an argument
  3. Bash script alters the ip
  4. Ping the altered ip
  5. Results recorded as an item
  6. There is already a ping item against the vm
  7. Trigger created to check the new item and existing ping item to capture and alert when host is pingable and vm is not

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.