Icinga2 Vspheredb how to get esxi host where vm runs on

Hello,

I am using the vspheredb module to import vm’s, hostst and datastore information from our vmware environment. However, now I want expand my single icinga2 master server with 2 satellite servers and split the vspheredb imports based on the location where a vm is running. So if vm x is running in datacenter y I would like the vm to be checked by the icinga2 satellite that is running in datacenter y.

I have tried to combine 2 import sources to get the esxi host into the vm configuration, but that did not work or I did not get that to work.
The easiest way would be to get the host variable (which is visible on de vspheredb virtual machine location section) from the vm import and add that to a vm configuration.

An other way would be tags, but vm related tags are not imported by the vspheredb module.

In the names of the hypervisors, datastores and tags are the names of the datacenters on which the vm’ sare running. So based on those names I would be able to make the split.

So I am kind of stuck here.

Before you ask a question, you can check the troubleshooting documentation first, maybe you can find an answer here.

Please describe your problem as detailed as possible and don’t forget to use a meaningful title :slight_smile:
We also have a markdown formatting guide to help you make your topics more readable!

Give as much information as you can, e.g.

  • Director version (System - About): 1.11.3
  • Icinga Web 2 version and modules (System - About): 2.11.4
  • |icingadb||1.0.2|
    |vspheredb||1.7.1|
  • Icinga 2 version (icinga2 --version): r2.13.6-1
  • Operating System and version: Debian 12.11
  • Webserver, PHP versions: Apache 2.4.62 - PHP 8.2+93

True but I can’t find it the import source in my installation either.

What I use is custom_values so maybe but the satellite zone in there or patch the import source and make a pull request?

Adding a new Director import of type SQL and pulling the information from the vSphereDB DB could also help - I used this approach before the UUID was exposed.

No, me neither. I don’t know whats coming in the new release of the vspheredb module, but for now I found that the old Vsphere module provides what I need. In that module the esxi host is imported with the vm info. I can then select on the hypervisor on which side to check the vm.

Hopefully this option will be added to the new vspheredb release, because I do not prefer using an old and out of development module.