VMware Vsphere import & sync rules

  • Hi guys,


    next to my hardware machines i want to import the virtual machines of my company via the Icingaweb2 VMware vSphere module.

    The connection works and i get a preview. Without any specific modificators and sync-properties or filters in the sync rule it imports all the machines - great until you see that some

    machines have no FullName rather than an ip adress!




    My goals:

    • import machines and get no errors likeDiese Synchronisationsregel schlug bei der letzten Prüfung um 2017-07-31 20:08:45 fehl:Data is not nested, cannot access guest.guestFullName: stdClass::__set_state(array( 'guest' => NULL, 'hostIP' => NULL, 'name' => 'ANSIBLE01', ))
      when trying to assign the guest.guestFullName to the custom var "os".
    • only import VMs that are running
    • only import VMs where an IP-adress is assigned (for that i configured already a modificator, see screenshot)
    • assign a specific host_template (windows or linux)
    • assign a specific hostgroup (Windows-Server or Linux-Server)

    For the beginning, please just help me with the possibility to import just running windows machines and assign them to the hostgroup windows-server

    I am a bit confused about the possibilities in the sync-properties with RegEx etc.

    Maybe there is any tutorial out there or somebody has experience with import via the icingaweb2 vSphere module?


    Thanks a lot!

  • Edit:


    i found out how to filter for groups and add the synchronized hosts to my hostgroups.

    I now want to filter out all hosts where the hostIP var is empty.


    parent=Infrastruktur&hostIP!=''

    does not work as filtering argument, it imports still hosts with no address assigned...

  • whoa there, you are on the cutting edge, this module is supposed to be shipped with director 4.0, which will be released next week.

    I doubt anyone has experience with it yet.


    I would say this is not an Icinga2 problem, but one of VMWare as it is missing data.

    The visibility of the hosts to Icinga should be realised through group rights to the User that connects to VMWare.

    Linux is dead, long live Linux


    Remember to NEVER EVER use git repositories in a productive environment if you CAN NOT control them

  • You mean 1.4.0? Haha good to know - thanks for the information! ^^

    The user has full rights to read but maybe I have still a bit to wait until I ask again in the forum.

    Still, I'll keep trying - maybe I'll become it to work!

  • could you create a user that is only able to see hosts of a certain group.

    with such a mechanic you could build a workaround your problem.

    Linux is dead, long live Linux


    Remember to NEVER EVER use git repositories in a productive environment if you CAN NOT control them