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.