Yes, stuff like this happens, if you work without partner or coworkers, you can ask.
I work with the Linuxfabrik but you can find a list of partners here: https://icinga.com/company/partners/
Or get support directly from the Icinga GmbH.
But back on topic - the previews from the director of how I solved it:
zones.d/director-global/servicesets.conf
/**
* Service Set: 116 vSphereDB VM
*
* assign where host.vars.custom_values.icinga_director_teams || "vspheredb-vm" in host.vars.custom_tags
*/
apply Service "Icingacli vSphereDB - VM Status" {
import "116-tpl-service-vspheredb-vm"
assign where host.vars.custom_values.icinga_director_teams || "vspheredb-vm" in host.vars.custom_tags
import DirectorOverrideTemplate
}
if you wonder about host.vars.custom_values.icinga_director_teams
, It gets created in the Director automation from the vSphereDB module import source. The goal is to no longer have to manage this kind of information by hand in Icinga.
zones.d/director-global/service_templates.conf
template Service "116-tpl-service-vspheredb-vm" {
import "tpl-service-generic"
check_command = "116-cmd-check-icingacli-vspheredb"
max_check_attempts = "3"
check_interval = 1m
retry_interval = 15s
command_endpoint = null
vars["116_check_icingacli_vspheredb_name"] = "$host.name$"
vars["116_check_icingacli_vspheredb_type"] = "vm"
}
zones.d/director-global/commands.conf
object CheckCommand "116-cmd-check-icingacli-vspheredb" {
import "plugin-check-command"
command = [ "/usr/bin/icingacli", "vspheredb", "check" ]
arguments += {
"--name" = {
description = "name of object to check - only needed if check_type is singular"
order = 1
required = false
value = "$116_check_icingacli_vspheredb_name$"
}
check_type = {
description = "Type of check to perform"
order = 0
required = true
skip_key = true
value = "$116_check_icingacli_vspheredb_type$"
}
}
}
Screenshots of the command configuration in the Director: