KVM Hypervisor to VMs relationshop mapping

This is something for Icinga2 DSL experts. I’ve CMDB having the hypervisor and VMs running on them information.

Now I want to setup relationship. in Icinga2 using that information. I can explore the option to get VMs names from hypervisors directly as a part of a check and feed it into a relationship config. Either way, setting up the relationship config is what I’m after.

Please advise
Thanks

Hello moniga!

What kind of config have you already tried?

Best,
A/K

I’ve not tried any config yet but trying to figure out ways to achieve what I want. Any suggestions?
Thanks

I’m sorry, no. Not w/o any more specific examples at least.

Here is current setup and the thought process I’ve at least an idea at this point…

Hypervisor and VMs running on it are separate host objects in Icinga.

I want to setup a check on each VM to show it is running on 'a" hypervisor. Another check on Hypervisor to show the VMs running on it. I can get the list of VMs per hypervisor from our CMDB system via json api. which gets updated frequently throughout the day.

Since the hosts are in Icinga2, I want to setup hypervisor-VM relationship via function etc… among the host objects. to establish the mutual relationships.

It maybe a bit confusing but the idea is to provide visibility to know a VM is running on ‘this’ hypervisor and ‘this’ hypervisor is running ‘these’ VMs.

Thanks

Sounds that you’ll need the Director. But don’t ask me how to do any automation with it…