Agents and global zones

(Carsten Köbke) #1

Hello community,

do agents need any global zones in their zone configuration (except for commands when they use self written ones)? Iam not sure if they also need to sync timeperiods, templates and such things.


(Kevin Honka) #2

in my experience, they only need the global zones to sync commands and configs if they are to run with their own scheduler. they wouldn’t essentially need timeperiods etc. I’m not sure, there is a current way to sync only some objects on a global zone.

(Carsten Köbke) #3

Thats my question, what objects need to be synced to the agent. The documentation is a bit thin about this.
I tested it without any global zone and the agent still works perfect, trange thing is that there is not 1 synced config file now under /var/lib/icinga2/api

(Carsten Köbke) #4

Or is there a list what needs to be synced to an agent?

  • [ ] CheckCommands that are not in the ITL ?
  • [ ] Timeperiods ?
  • [ ] Services ?
  • [ ] Downtimes ?
  • [ ] Dependencyies ?

(Kevin Honka) #5

I’m not sure, as this is only a sideeffect for me that has never picked my curiosity.
But I would say, that CheckCommands and Services do need to be synced to a agent if it is supposed to run it’s own scheduler.

(Carsten Köbke) #6

I tested it without any global zone. only the own endpoint zone and the zone he is in. No config at all gets synced to the endpoint (at least /var/lib/icinga2/api/zones is empty), but checks are executed still on the agent (confirmed thru debug.log). So i guess the only thing we need to put into a global zone for agents are checkcommands (and maybe constants that are needed for commands/services)

(Michael Friedrich) #7

If clients only act as command_endpoint, you’d only need to sync custom check commands there which are not covered by the local ITL commands.

If you are looking into a full blown client with its own local scheduler, you’d need host, service objects and everything else referenced in there (timeperiods, checkcommands, etc.).