Icinga I can't add a check command to my host

So I have created a external command.
Called ping4-windows

object CheckCommand "ping4-windows" {
    import "plugin-check-command"
    command = [ PluginDir + "/check_ping.exe", "-4" ]
    timeout = 1m
    arguments += {
        "-H" = {
            description = "Address to ping"
            required = true
            value = "$ping_win_address$"
        }
        "-c" = {
            description = "Warning threshold: RTA and package loss seperated by comma"
            value = "$ping_win_crta$,$ping_win_cpl$%"
        }
        "-p" = {
            description = "Number of packages to send"
            value = "$ping_win_packets$"
        }
        "-t" = {
            description = "Timeout in ms"
            value = "$ping_win_timeout$"
        }
        "-w" = {
            description = "Warning threshold: RTA and package loss seperated by comma"
            value = "$ping_win_wrta$,$ping_win_wpl$%"
        }
    }
    vars.ping_win_address = "$address$"
    vars.ping_win_packets = "5"
    vars.ping_win_timeout = "1000"
}

This command is used in a Service-Template.
Called Win-Ping.

Win-Ping is part of the Service-Set called “Standard Windows System”.

And "Standard Windows System is assigned to my Windows client I want to monitor.

At deployment I get the error:

[2022-05-16 11:37:37 +0000] critical/config: Error: Validation failed for object 's060w76' of type 'Host'; Attribute 'check_command': Attribute must not be empty.
Location: in [stage]/zones.d/s060w44/hosts.conf: 1:0-1:20
[stage]/zones.d/s060w44/hosts.conf(1): object Host "s060w76" {
                                       ^^^^^^^^^^^^^^^^^^^^^
[stage]/zones.d/s060w44/hosts.conf(2):     import "windows-agent"
[stage]/zones.d/s060w44/hosts.conf(3): 
[2022-05-16 11:37:37 +0000] critical/config: 1 error
[2022-05-16 11:37:37 +0000] critical/cli: Config validation failed. Re-run with 'icinga2 daemon -C' after fixing the config.

The host itself is child of the Host-Template
Generic Host → windows-agent

I tried to assign Win-Ping manual to the host directly too, didn’t work either.

What do I do wrong?

  • Version used r2.13.3-1
  • Operating System and version Ubuntu 20.04
  • Enabled features api checker icingadb ido-mysql mainlog notification
  • Icinga Web 2 version and modules 2.10.1
  • Director 1.9.1
  • Login over LDAP integration

TL;DR
Basically I can’t add any service checks to a Host in the Director, no matter what kind of check I try, or if I add it to the Host or Host-Template.

From the error it sounds like the template you use to create the service is missing the check command.