Hello,
I am new to Icinga2 and want to setup some services to monitor switch uptimes. I have copied the scripts to /etc/icinga2/scripts and when I run them on the command line, I get value I am targeting.
But when setting up the service in Icinga2 Director I get this error.
[2026-06-17 10:14:37 +0200] critical/config: Error: Validation failed for object 'Switch-EG-Vertrieb!Uptime Switch EG - Vertrieb' of type 'Service'; Attribute 'command_endpoint': Object 'Switch-EG-Vertrieb' of type 'Endpoint' does not exist.
Startup Log
[2026-06-17 10:14:37 +0200] information/cli: Icinga application loader (version: r2.16.1-1)
[2026-06-17 10:14:37 +0200] information/cli: Loading configuration file(s).
[2026-06-17 10:14:37 +0200] information/ConfigItem: Committing config item(s).
[2026-06-17 10:14:37 +0200] information/ApiListener: My API identity: icinga2host
[2026-06-17 10:14:37 +0200] critical/config: Error: Validation failed for object 'Switch-EG-Vertrieb!Uptime Switch EG - Vertrieb' of type 'Service'; Attribute 'command_endpoint': Object 'Switch-EG-Vertrieb' of type 'Endpoint' does not exist.
Location: in [stage]/zones.d/director-global/service_templates.conf: 11:5-11:32
[stage]/zones.d/director-global/service_templates.conf(9): enable_flapping = true
[stage]/zones.d/director-global/service_templates.conf(10): enable_perfdata = true
[stage]/zones.d/director-global/service_templates.conf(11): command_endpoint = host_name
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[stage]/zones.d/director-global/service_templates.conf(12): }
[stage]/zones.d/director-global/service_templates.conf(13):
[2026-06-17 10:14:37 +0200] critical/config: 1 error
[2026-06-17 10:14:37 +0200] critical/cli: Config validation failed. Re-run with 'icinga2 daemon -C' after fixing the config.
How can I fix this?
Here is the service template I used to create the service. I used the same template for Icinga For Windows Services and they worked fine.
zones.d/director-global/service_templates.conf
template Service "Service-Template 1" {
max_check_attempts = "3"
check_interval = 5m
retry_interval = 1m
enable_notifications = true
enable_active_checks = true
enable_passive_checks = false
enable_event_handler = true
enable_flapping = true
enable_perfdata = true
command_endpoint = host_name
}
Thank you for your help.
