Service cannot be put in global zone

Hi everyone,

I’m new in icinga director and surfing the community page I saw that when I’m using icinga director I have do disable recursive inclusion of conf.d folder on the master, after I did it my services went from working to unknown state, then i tried to put my director service templates into global zone, as Icinga2 community suggests but i get this error during the deployment.
I noticed that i dont get this error everytime but only with specific services, so I’m confused

here the director error

Blockquote
[2023-02-07 10:11:42 +0100] information/cli: Icinga application loader (version: r2.13.3-1)
[2023-02-07 10:11:42 +0100] information/cli: Loading configuration file(s).
[2023-02-07 10:11:42 +0100] warning/config: Ignoring directory ‘/var/lib/icinga2/api/zones/satellite-test1.blueday.it’ for unknown zone ‘satellite-test1.blueday.it’.
[2023-02-07 10:11:42 +0100] information/ConfigItem: Committing config item(s).
[2023-02-07 10:11:42 +0100] information/ApiListener: My API identity: monitor-master
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘01195-tvr-firewall-fortigate-schio!fortigate-snmp-interfaccia_rete-LAN_PROD-internal4’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘02683-dal_maistro-firewall-fortigate-montedimalo!fortigate-snmp-interfaccia_rete-LAN_UFFICI-internal’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘02090-vepack-firewall-fortigate-padova!fortigate-snmp-interfaccia_rete-ABITAZIONE_01-internal4’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘00649-tecnobeta-firewall-fortigate-zane!fortigate-snmp-interfaccia_rete-FIBRA_INTERPLANET-lan4’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘02172-zanuso-firewall-fortigate!fortigate-snmp-interfaccia_rete-FIBRA_TELECOM-wan1’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘02816-bpk-firewall-fortigate-tezze_sul_brenta!fortigate-snmp-interfaccia_rete-ADSL_TRIVENET_WAN2’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘00254-frescura-firewall-fortigate-thiene!fortigate-snmp-interfaccia_rete-CASA_VINCENZO-internal6’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘00064-basso_viaggi-firewall-fortigate!fortigate-snmp-interfaccia_rete-LAN_UFFICI-internal’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘02780-tre_esse-firewall-fortigate!fortigate-snmp-interfaccia_rete-FIBRA_TIM-wan2’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘00920-rifa-firewall-fortigate-schio!fortigate-snmp-interfaccia_rete-LAN_PROD-internal2’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘01577-saf_bianco-firewall-fortigate-schio!fortigate-snmp-interfaccia_rete-LAN_TVCC-internal5’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘02090-vepack-firewall-fortigate-padova!fortigate-snmp-interfaccia_rete-ADSL_TELECOM-wan1’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘00013-tna_cargo-firewall-fortigate-brendola!fortigate-snmp-interfaccia_rete-LAN_MAGAZZINO-port5’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘03033-canol-firewall-fortigate-schio!fortigate-snmp-interfaccia_rete-ADSL_TELECOM’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘01339-lucas-firewall-fortigate-chiuppano!fortigate-snmp-interfaccia_rete-FIBRA_TIM-wan2’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘01408-considi-firewall-fortigate!fortigate-snmp-interfaccia_rete-FIBRA_REDDER-wan2’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘02490-duso-firewall-fortigate-sarcedo!fortigate-snmp-interfaccia_rete-ADSL_TELEMAR-wan’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘01163-rtm-firewall-fortigate!fortigate-snmp-interfaccia_rete-LAN_UFFICI-internal’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘02060-sarto_veneto-firewall-fortigate-lusia!fortigate-snmp-interfaccia_rete-LAN_UFFICI-internal’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘01339-lucas-firewall-fortigate-chiuppano!fortigate-snmp-interfaccia_rete-LAN_UFFICI-internal’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘02416-danzo-firewall-fortigate!fortigate-snmp-interfaccia_rete-LAN_UFFICI-internal’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘01713-tickets_maker-firewall-fortigate!fortigate-snmp-interfaccia_rete-ADSL_TIM-wan’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘00013-tna_cargo-firewall-fortigate-brendola!fortigate-snmp-interfaccia_rete-ADSL_IPCOMPANY-wan1’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘02818-pg_consulenze-firewall-fortigate!fortigate-snmp-interfaccia_rete-FTTH_TIM-wan’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘00005-valle_autotrasporti-firewall-fortigate!fortigate-snmp-interfaccia_rete-LAN_RICOH-port2’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘00920-rifa-firewall-fortigate-schio!fortigate-snmp-interfaccia_rete-FTTC_VOIPVOICE-wan2’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘01195-tvr-firewall-fortigate-schio!fortigate-snmp-interfaccia_rete-FIBRA_WIND-wan1’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘02592-jfd-firewall-fortigate-cavazzale!fortigate-snmp-interfaccia_rete-LAN_EX_SAID-internal3’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘00254-frescura-firewall-fortigate-thiene!fortigate-snmp-interfaccia_rete-HDSL_MAXFONE-wan1’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘01749-cogeass-firewall-fortigate!fortigate-snmp-interfaccia_rete-FIBRA_WIND-wan’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘01753-gili_creations-firewall-fortigate-schiavon!fortigate-snmp-interfaccia_rete-internal’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘01408-considi-firewall-fortigate!fortigate-snmp-interfaccia_rete-DMZ-dmz’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘00747-tekno_stamap-firewall-fortigate-grisignano!fortigate-snmp-interfaccia_rete-FIBRA_REDDER-wan1’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘01304-effedue-firewall-fortigate!fortigate-snmp-interfaccia_rete-lan’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘01408-considi-firewall-fortigate!fortigate-snmp-interfaccia_rete-LAN_UFFICI-internal’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘02090-vepack-firewall-fortigate-grisignano!fortigate-snmp-interfaccia_rete-LAN_UFFICI-internal’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘01925-dal_pozzo-firewall-fortigate-grisignano!fortigate-snmp-interfaccia_rete-LAN_UFFICI-internal’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘02592-jfd-firewall-fortigate-cavazzale!fortigate-snmp-interfaccia_rete-ADSL_PAGINE_INTERNET-wan1’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘02090-vepack-firewall-fortigate-padova!fortigate-snmp-interfaccia_rete-LAN_UFFICI-internal’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘02682-vicenza_welfare-firewall-fortigate-arzignano!fortigate-snmp-interfaccia_rete-FIBRA_VOIPVOICE-wan’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘02090-vepack-firewall-fortigate-grisignano!fortigate-snmp-interfaccia_rete-ABITAZIONE_01-internal4’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘01133-studio_rebecca-firewall-fortigate-vicenza!fortigate-snmp-interfaccia_rete-FIBRA_TELECOM-wan2’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘02371-laprimaplastic-firewall-fortigate!fortigate-snmp-interfaccia_rete-ADSL_TELECOM-wan’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘00343-omp-firewall-fortigate-santorso!fortigate-snmp-interfaccia_rete-LAN_UFFICI-internal’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘01534-tecnopaper-firewall-fortigate-rosa!fortigate-snmp-interfaccia_rete-IPROUTE-wan2’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘00005-valle_autotrasporti-firewall-fortigate!fortigate-snmp-interfaccia_rete-FIBRA_INTERPLANET-wan1’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘02592-jfd-firewall-fortigate-cavazzale!fortigate-snmp-interfaccia_rete-LAN_UFFICI-internal’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘02090-vepack-firewall-fortigate-grisignano!fortigate-snmp-interfaccia_rete-ADSL_TELECOM-wan1’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘02528-dea_electron-firewall-fortigate_80F-marano_vicentino!fortigate-snmp-interfaccia_rete-FIBRA_UNICATLC-wan1’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘00069-gimmi-firewall-fortigate-schio!fortigate-snmp-interfaccia_rete-FIBRA_FASTWEB-redundant’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘00280-sassi_editore-firewall-fortigate-san_vito_di_leguzzano!fortigate-snmp-interfaccia_rete-LAN_UFFICI-internal’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘00920-rifa-firewall-fortigate-schio!fortigate-snmp-interfaccia_rete-LAN_UFFICI-internal’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘01339-lucas-firewall-fortigate-chiuppano!fortigate-snmp-interfaccia_rete-DMZ_TELECAMERE-dmz’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘00013-tna_cargo-firewall-fortigate-brendola!fortigate-snmp-interfaccia_rete-FIBRA_IPCOMPANY-port7’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘01925-dal_pozzo-firewall-fortigate-grisignano!fortigate-snmp-interfaccia_rete-ABITAZIONE_01-internal4’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘01534-tecnopaper-firewall-fortigate-rosa!fortigate-snmp-interfaccia_rete-LAN_HOME-internal6’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘00064-basso_viaggi-firewall-fortigate!fortigate-snmp-interfaccia_rete-ADSL_TELEMAR-wan1’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘01541-p63-firewall-fortigate!fortigate-snmp-interfaccia_rete-ADSL_WELCOME-wan’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘02397-aral-firewall-fortigate!fortigate-snmp-interfaccia_rete-FIBRA_TIM-wan1’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘01339-lucas-firewall-fortigate-chiuppano!fortigate-snmp-interfaccia_rete-ADSL_TELEMAR-wan1’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘00013-tna_cargo-firewall-fortigate-brendola!fortigate-snmp-interfaccia_rete-LAN_UFFICI-internal’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘00254-frescura-firewall-fortigate-thiene!fortigate-snmp-interfaccia_rete-LAN_UFFICI-internal’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘03033-canol-firewall-fortigate-schio!fortigate-snmp-interfaccia_rete-LAN_UFFICI’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘02710-ths-firewall-fortigate!fortigate-snmp-interfaccia_rete-LAN_UFFICI-internal’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘00254-frescura-firewall-fortigate-thiene!fortigate-snmp-interfaccia_rete-ADSL_MAXFONE-internal5’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘02816-bpk-firewall-fortigate-tezze_sul_brenta!fortigate-snmp-interfaccia_rete-FIBRA_IPCOMPANY-wan1’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘01925-dal_pozzo-firewall-fortigate-grisignano!fortigate-snmp-interfaccia_rete-ADSL_TELECOM-wan1’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘02780-tre_esse-firewall-fortigate!fortigate-snmp-interfaccia_rete-LAN_UFFICI-internal’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘02060-sarto_veneto-firewall-fortigate-lusia!fortigate-snmp-interfaccia_rete-LAN_TELEFONI-internal’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘01195-tvr-firewall-fortigate-schio!fortigate-snmp-interfaccia_rete-LAN_UFFICI-internal’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘01133-studio_rebecca-firewall-fortigate-schio!fortigate-snmp-interfaccia_rete-LAN_UFFICI-internal’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘02710-ths-firewall-fortigate!fortigate-snmp-interfaccia_rete-ADSL_FASTWEB-wan1’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘01534-tecnopaper-firewall-fortigate-rosa!fortigate-snmp-interfaccia_rete-INFRACOM-wan1’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘01376-comal-firewall-fortigate-tripoli!fortigate-snmp-interfaccia_rete-FIBRA_TELECOM-wan1’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘01534-tecnopaper-firewall-fortigate-rosa!fortigate-snmp-interfaccia_rete-LAN_UFFICI-internal’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘02358-progesto-firewall-fortigate!fortigate-snmp-interfaccia_rete-FIBRA_INFOSTRADA-wan’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘01376-comal-firewall-fortigate-tripoli!fortigate-snmp-interfaccia_rete-LAN_UFFICI-internal’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘01195-tvr-firewall-fortigate-schio!fortigate-snmp-interfaccia_rete-FIBRA_FASTWEB-internal7’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘00977-teca25-sito_web-www.teca25.it!fortigate-snmp-interfaccia_rete-FIBRA_VOIPVOICE-internal3’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘02528-dea_electron-firewall-fortigate_80F-marano_vicentino!fortigate-snmp-interfaccia_rete-HA’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘02592-jfd-firewall-fortigate-cavazzale!fortigate-snmp-interfaccia_rete-LAN_DMZ_EX_SAID-internal4’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘01343-win_pharma-firewall-fortigate-lerino!fortigate-snmp-interfaccia_rete-FIBRA_VOIPVOICE-wan2’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘01534-tecnopaper-firewall-fortigate-rosa!fortigate-snmp-interfaccia_rete-LAN_PROD-internal4’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘02416-danzo-firewall-fortigate!fortigate-snmp-interfaccia_rete-FIBRA_TELECOM-wan1’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘01343-win_pharma-firewall-fortigate-lerino!fortigate-snmp-interfaccia_rete-LAN_UFFICI-internal’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘01577-saf_bianco-firewall-fortigate-schio!fortigate-snmp-interfaccia_rete-LAN_UFFICI-internal’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘02066-give_emotions-firewall-fortigate!fortigate-snmp-interfaccia_rete-FTTC_FASTWEB-wan’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: Error: Service ‘00977-teca25-sito_web-www.teca25.it!fortigate-snmp-interfaccia_rete-DMZ-dmz’ cannot be put into global zone ‘director-global’.
[2023-02-07 10:11:42 +0100] critical/config: 88 errors
[2023-02-07 10:11:42 +0100] critical/cli: Config validation failed. Re-run with ‘icinga2 daemon -C’ after fixing the config.

Here a screenshot of the state after commenting conf.d

Someone has idea of what could the problem be?

Best regards

Niccolò

Hello :slight_smile:

Please share the config for one of the hosts and services (obscure sensitive data).

What is the output of the UNKNOWN checks?

Did you have any self-written config in /etc/icinga2/conf.d? Or was it just the example config?
Did you use the Icinga Director kickstart when you had the inclusion of the conf.d directory active?

Hello, thanks for the reply

Ok for the satellite checks i wrote it without director, beacuse I read it in the doc, i don’t know how to do it with director without stucking it in pending state.

Inside the satellite zone i have:

object Host "niccolo-bd.blueday.it" {
  import "generic-host"
  address = "192.168.0.69"
}

and no services ( but normally I’ve seen that when i create a host it automatically generate a service that check ping )

Working on it i’ve seen that the reason of the unknown state is a missing folder, so it’s all ok about it

I do not have self written config in conf.d and yes, i used the kickstart while i had the inclusion of the conf.d directory active

Where did you save the configuration for the servcies? Did you put them in the same location as the host?

Yes ususally I put my Object Service in the same location

Ok, so the host posted above is in some file like /etc/icinga2/zones.d/satellite-zone/hosts.conf and the service are in /etc/icinga2/zones.d/satellite-zone/services.conf?

Yes

I found that i can also write a single file named satellite.conf (in that path) and store there both hosts and services

which is better?

doesn’t matter.
I would opt for separate files for the config objects (hosts, service, commands and so on).

Can you share the service config (or at least one service)?
At the moment I don’t see were the problem originates from.

I deleted all my satellite services during the debug, but this is the schema i followed:

if i want a service that check tcp on niccolo.blueday.it :

object Service "tcp" {
  import "template-tcp"
  host_name = "niccolo.blueday.it"
  check_command = "tcp"
}

I also found the following template but i dont know the difference between “object service” and “apply service” so i did not use it

apply Service “ping4” {
check_command = “cluster-zone”
assign where get_object(“Endpoint”, host.name)
}

Hm, if the services from your first post are now deleted, the config deploys correctly at the moment, yes?

And all the services and hosts were under /etc/icinga2/zones.d/<satellite-zone-name>/whatever.conf?
And the service and host templates where configured via the Icinga Director?

“object service”: refers to a single service that is pinned to exactly one host. Thus you need to set the host_name option in the service definition. (I would call this the “old” way of deploying services. It is unflexible/not dynamic)

“apply service”: This is an apply rule. With it you can define logical statement which the pin the services to one or multiple hosts, depending on the conditions you have defined in the statement.
Here is an example:
image
assign where host.vars.os_family == "windows" && host.vars.tags.os_layer == "managed" && !(host.vars.appliance)
This way all hosts that fit the conditions automatically receive the service when the deployment passes. This is helpful for automating the monitoring, as you only have to worry about your hosts and defining them in a way that all information is filled in.
Additionally to that you have Service sets (a Icinga Director feature) that combines multiple services into a set and then applies them via the same mechanism as “apply service”.

Yes config deploys correctly, i just cant’ see the service running under the host ( that’s why i would put them in local zone )

immagine

when i had the inclusion of conf.d i could see a pending ping service, but now after i commented it it dont’ even show me if the service is correctly running, is it correct?

Great! Thank you, now is way more clear

Guess: Because there aren’t any at the moment.

What do you mean by that? Were did you put them?

The config files in /etc/icinga2/conf.d generate some example host/services (like a ping service). When you remove them from the inclusion then those host/services vanish. So yes, that’s correct.
The only config files I include from that folder are api-users.conf and commands.conf(so the default notification commands are usable in the Icinga Director)

yes but i could not see them also when they were in icinga2/zones.d/satellite/satellite.conf file

since i could not see the services active I changed the cluster zone of my services to global, I read that that was the best practice when using director

ok perfect then is all correct in my conf, that’s a relief.

oh ok i only have api-users.conf into it

Then a crucial question is: after putting api-users.conf and commands.conf should i be able to set my new satellites services directly from director?

Yes, that should work then. Remember that you always need to reload/restart your icinga2 service after changing local config files!

Try creating a simple service template that uses the ping or hostalive command.
Then create a serivce apply rule that uses the template and assign it where host.name == niccolo-bd.blueday.it
And then deploy the configuration via the Director.
That should leave you with a ping check against the host address of that host.

Great, thank you! All clear

should I set the template as global?

Leave the zone option untouched. Templates will be put into director-global by default when created with the Icinga Director.

I only set the zone to something specific on host templates that should pin hosts (and there their services) to a satellite zone.
Example:

As services automatically “belong” to the same zone as their host is in, setting the zone in a service (template) usually only results in problems.

Perfect thank you so much!

I’ll follow your example

Hello,

I created a new host from director that should be pinged by the satellite, i created it as you showed in the image but i saw my hosts and checks stuck in pending state,

Then I created a host manually and it seems working good, and i was quite confused, so i searched for the configuration folder and i saw this:

Icinga director writes new hosts in
./var/lib/icinga2/api/packages/director/############/zones.d/satellite-bd/hosts.conf

Intead of writing in /etc/icinga2/zones.d/satellite-bd/satellite-bd.conf

Is there a way to make director write in
/etc/icinga2/zones.d/satellite-bd/satellite-bd.conf?

Thank you!

That is correct, as the Director sends the configuration via API to the icinga2 core.
https://icinga.com/docs/icinga-director/latest/doc/10-How-it-works/

Please share the configs of the hosts you have created.

in /etc/icinga2/zones.d/satellite.bd/:

object Host “niccolo-bd.blueday.it” {
check_command = “hostalive”
address = “192.168.0.69”
}

in /var/lib/icinga2/api

object Host “provanic.blueday.it” {
import “sat-ping”

display_name = "provanic.blueday.it"
address = "192.168.0.70"

}