# One Host Object & Checks from different Zones

**URL:** <https://community.icinga.com/t/one-host-object-checks-from-different-zones/10713>\
**Category:** Service Monitoring\
**Tags:** vspheredb, vsphere, satellite\
**Created:** [September 29, 2022, 12:24pm UTC](https://community.icinga.com/t/one-host-object-checks-from-different-zones/10713 "2022-09-29T12:24:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sbeee](https://community.icinga.com/letter_avatar_proxy/v4/letter/s/58f4c7/32.png) [@sbeee](https://community.icinga.com/u/sbeee)\
**Post date:** [September 29, 2022, 12:24pm UTC](https://community.icinga.com/t/one-host-object-checks-from-different-zones/10713/1 "2022-09-29T12:24:53Z")

</div>

Hi,

i’ve a master-satellite setup with a satellite in a DMZ. Icingaweb2 is only running on the master. On the master the vshperedb module is installed, which can connect to the vcenter in the DMZ. The Satellite in the DMZ is executing all other Checks.

Now i want to create a host object that can combine the host/ping-check to the ESX Host from the Satellite AND a vspheredb-check from the master. There is no Icinga Host who can do all Checks alone.

Is that possible?

My config so far (ping from the satellite is ok, vspheredb check fails as expected)…

> $ cat /etc/icinga2/zones.d/DMZ/test-esxhost-dmz.conf
> 
> object Host “host1.dmz” {  
> display\_name = name + " (ClusterA)"  
> import “esx-host-dmz”  
> address = “1.2.3.4”  
> }
> 
> object Endpoint “host1.dmz” {  
> log\_duration = 0  
> }
> 
> object Zone “host1.dmz” {  
> endpoints = [“host1.dmz”]  
> parent = “DMZ”  
> }

> $ cat /etc/icinga2/zones.d/global-templates/vsphere.conf
> 
> template Host “esx-host-dmz” {  
> import “generic-host”  
> vars.os = “ESXi-DMZ”  
> }
> 
> object CheckCommand “icingacli-vspheredb” {  
> import “plugin-check-command”  
> command = [“/usr/bin/icingacli”, “vspheredb”, “check”]  
> timeout = 1m  
> arguments += {  
> “(no key)” = {  
> order = 1  
> required = true  
> skip\_key = true  
> value = “$vspheredb\_check\_mode$”  
> }  
> “–name” = {  
> order = 2  
> required = false  
> value = “$vspheredb\_object\_name$”  
> }  
> “–perfdata” = {  
> order = 3  
> required = false  
> set\_if = “$vspheredb\_perfdata$”  
> }  
> }  
> }
> 
> apply Service “icingacli-vspheredb-host” {  
> import “generic-service”  
> display\_name = “Check ESX Host”  
> check\_command = “icingacli-vspheredb”  
> vars.vspheredb\_check\_mode = “host”  
> vars.vspheredb\_object\_name = host.name  
> vars.vspheredb\_perfdata = true  
> vars.notifications =   
> assign where host.vars.os == “ESXi”  
> assign where host.vars.os == “ESXi-DMZ”  
> }

now when i copy this config to the master zone (and change the configured parent from dmz to master) than the vspheredb check is ok but the ping fails.
