Startint icinga plugins and clientfunctions

I have set up the following checks and I’m getting either the status PENDING or the error message:
Check command ‘powershell-icinga-check-updates’ does not exist.
The client is running and the connection to the server is established. The script itself can be executed manually in PowerShell on the client.
I don’t know where the problem is

I use icinga 2 V r2.15.2-1)

my features
Disabled features: command compatlog debuglog elasticsearch gelf graphite icingadb influxdb influxdb2 journald livestatus opentsdb perfdata syslog
Enabled features: api checker ido-mysql mainlog notification

web version
2.12.65

object Endpoint “ubuntu” {
host = “192.168.99.132”
}

object Zone “master” {
endpoints = [ “ubuntu” ]
}

object Endpoint “desktop-3fjbnle” {
host = “192.168.99.101”
}

object Zone “desktop-3fjbnle” {
endpoints = [ “desktop-3fjbnle” ]
parent = “master”
}

object Host “desktop-3fjbnle” {
import “generic-host”
address = “192.168.99.101”
vars.os = “Windows”
vars.agent_endpoint = “desktop-3fjbnle”

zone = “desktop-3fjbnle”
}

object CheckCommand “powershell-icinga-check-updates” {
import “plugin-check-command”
command = [ “powershell.exe” ]
arguments = {
“-Command” = {
value = “Invoke-IcingaCheckUpdates”
description = “Run Icinga PowerShell Updates check”
required = true
}
}
}

object CheckCommand “check_network_traffic_windows” {
import “plugin-check-command”

command = [ “powershell.exe”, “-ExecutionPolicy”, “Bypass”, “-File”, “C:\Nagios\check_network_traffic.ps1” ]

arguments = {
“-NIC” = {
value = “$nic$”
required = true
}
“-Warning” = {
value = “$traffic_warning$”
}
“-Critical” = {
value = “$traffic_critical$”
}
}

vars.nic = “Ethernet”
vars.traffic_warning = “80”
vars.traffic_critical = “100”
}

apply Service “Windows Updates” {
import “generic-service”
check_command = “powershell-icinga-check-updates”

command_endpoint = host.vars.agent_endpoint

check_interval = 24h

retry_interval = 1h

// Beispiel: Warnung bei 1 verfügbaren Update, Critical bei 5
vars.powershell_icinga_check_updates_warning = 1
vars.powershell_icinga_check_updates_critical = 5

assign where host.vars.os == “Windows”
}

apply Service “network_traffic” {
check_command = “check_network_traffic_windows”

vars.nic = “Ethernet”
vars.traffic_warning = “50”
vars.traffic_critical = “80”

assign where host.name == “desktop-3fjbnle”

command_endpoint = “desktop-3fjbnle”

/* host.vars.agent_endpoint # wichtig: Check wird vom Windows-Agent ausgeführt */
}

My guess is, that this is related to your zones configuration. So the endpoint does not know about the CheckCommand definition.

Can you try removing the zone-Entry from your Host object?

object Host “desktop-3fjbnle” {
  import “generic-host”
  address = “192.168.99.101”
  vars.os = “Windows”
  vars.agent_endpoint = “desktop-3fjbnle”
}

I removed the entry zone.

then I get this error

moestl@ubuntu:~$ sudo icinga2 daemon -C
[2026-02-05 16:17:04 +0000] information/cli: Icinga application loader (version: r2.15.2-1)
[2026-02-05 16:17:04 +0000] information/cli: Loading configuration file(s).
[2026-02-05 16:17:04 +0000] information/ConfigItem: Committing config item(s).
[2026-02-05 16:17:04 +0000] information/ApiListener: My API identity: ubuntu
[2026-02-05 16:17:04 +0000] critical/config: Error: Validation failed for object ‘desktop-3fjbnle!Festplatte’ of type ‘Service’; Attribute ‘command_endpoint’: Checkable with command endpoint requires a zone. Please check the troubleshooting documentation.
Location: in /etc/icinga2/conf.d/services.conf: 117:1-117:26
/etc/icinga2/conf.d/services.conf(115): }
/etc/icinga2/conf.d/services.conf(116):
/etc/icinga2/conf.d/services.conf(117): apply Service “Festplatte” {
^^^^^^^^^^^^^^^^^^^^^^^^^^
/etc/icinga2/conf.d/services.conf(118): import “generic-service”
/etc/icinga2/conf.d/services.conf(119): check_command = “disk-windows” // Nutzt den eingebauten ITL-Befehl
[2026-02-05 16:17:04 +0000] critical/config: Error: Validation failed for object ‘desktop-3fjbnle!CPU Auslastung’ of type ‘Service’; Attribute ‘command_endpoint’: Checkable with command endpoint requires a zone. Please check the troubleshooting documentation.
Location: in /etc/icinga2/conf.d/services.conf: 134:1-134:30
/etc/icinga2/conf.d/services.conf(132):
/etc/icinga2/conf.d/services.conf(133):
/etc/icinga2/conf.d/services.conf(134): apply Service “CPU Auslastung” {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/etc/icinga2/conf.d/services.conf(135): import “generic-service”
/etc/icinga2/conf.d/services.conf(136): check_command = “load-windows” // Befehl aus dem Framework
[2026-02-05 16:17:04 +0000] critical/config: Error: Validation failed for object ‘desktop-3fjbnle!Windows Updates’ of type ‘Service’; Attribute ‘command_endpoint’: Checkable with command endpoint requires a zone. Please check the troubleshooting documentation.
Location: in /etc/icinga2/conf.d/services.conf: 163:1-163:31
/etc/icinga2/conf.d/services.conf(161):