Configure custom port on agent_endpoints.conf using director

Hello guys, I am new to Icinga.
I need to configure an host using Director on a custom port because the 5665 is blocked from my endian firewall VPN.

I manually configured the file agents_endpoints.conf generated from director located in


like this:

object Endpoint "WIN16_TEMPLATE" {
    host = ""
    port = "5666"
    log_duration = 0s

and all is working fine, but obviously this configuration is reloaded when I deploy a new customization from director.

How can I set the custom port on director? I cannot find the option on Hosts or Host Templates configuration.

Thank you.

Hello Ashe and Welcome

When you define a Zone and endpoints in Director you have the option to specify the port to use.
Those are found in the Infrastructure option

See the image in the readme.
When you define it like that - the values will not be overwritten on each reload.


Thank you for your reply aflatto.

I supposed I had to work with zones and endpoints, but if I go to infrastructure configuration and I add my new endpoint like this:


And then I try to deploy the update I get the error:


If I check my master master zone the endpoint is included:


Did you add that record manually to the Zones.conf, or was this created in the director ?
In general the main /etc/icinga2/zones.conf is not altered by Director but it create the additional endpoints and zones in the /var/lib/icinga2/ files.