When using director you don’t need to take care about any zone and endpoint objects for your agents.
At the begining I added those line before run kickstart wizard in director.
As I read in several place this is the “good” way to add an endpoint / zone in director.
I don’t understand, if I don’t care about, how an agent know who is his parent ?
How this parent know if he had a parent or not ?
In the host object configuration in director there is a section where we have to specify the cluster zone, for what I had understoud, this is the way to tel director which zone / endpoint has to run the check
Whenever you change zones.conf
e.g. adding satellite, you need to run kickstart wizard (to import those changes).
Selecting Cluster Zone at your hosts in director, you select the corresponding endpoint(s) as parent. Selecting Yes for Icinga Zone will force director to create coresponding zone and endpoint objects for a host.
I finally succes to make my check by the satellite.
I had to install the entire stack on the satelite, included director, and everything is ok.
I can see check on the web ui of the satellite, executed by itself and I can see it on the master ui, executed by the satellite.
Everything good now. Thanks for your assistance
Sorry to say, director should be installed on master only. There is also no need to install “full stack” on satellites, however, this has no impact.
Without director I don’t know how to ask the satellite to do the check on the host, it doesn’t appears in the satellite web UI without to add the host on director.
But I would prefer the way you describe, director on master only and satellite get there configuration from master automaticaly. The question is ho can I do that ?
This is done automatically when everything is configured correctly. Then host must have the satellite zone configured and icinga will then sync objects from master to satellite.
In our setup the satellites do not have a web UI.
Satellites are just running Icinga2.
Masters are running Icinga2 and Icingaweb2.
Director is running as a module of Icingaweb2 on Master1.
Do you really want to have a web UI on the satellite?
Unfortunetly it’s more difficult than it seems, at least for me obviously.
Yes I really want a web ui on the satellite, why ? it can be a problem ?
No, we have such a deployment running since 2018 without any hiccups.
I will revert my server to a fresh OS install snapshot for trying to do the things as you describe, without director.
So if I resume, I have to :
- install icinga2
- configure it as a satellite like this
object Endpoint "masterB.fqdn" {
host = "masterB.fqdn"
port = "5665"
}
object Endpoint "masterA.fqdn" {
host = "masterA.fqdn"
port = "5665"
}
object Zone "master" {
endpoints = [ "masterB.fqdn", "masterA.fqdn" ]
}
object Endpoint "satellite.fqdn" {
}
object Zone "satellite.fqdn" {
endpoints = [ "satellite.fqdn" ]
parent = "master"
}
object Zone "global-templates" {
global = true
}
object Zone "director-global" {
global = true
}
- on the master in director, I use the kickstart wizzard to import configuration from this zones.conf file
object Endpoint "masterA.fqdn" {
host = "masterA.fqdn"
port = "5665"
}
object Endpoint "masterB.fqdn" {
host = "masterB.fqdn"
port = "5665"
}
object Endpoint "satellite.fqdn" {
host = "satellite.fqdn"
port = "5665"
}
object Zone "master" {
endpoints = [ "masterA.fqdn", "masterB.fqdn" ]
}
object Zone "satellite-service" {
endpoints = [ "satellite.fqdn" ]
parent = "master"
}
object Zone "global-templates" {
global = true
}
object Zone "director-global" {
global = true
}
- in director (on the master) on the host I want to be checked by the satellite I configure the cluster zone on the satellite like this
Am i wright ?
Yeah, you got it. Go for it.
My virtualization plateforme is unavailable for reverting snapshot so during this time I wonder if on my master node, I use some check which work with agent and I installed / imported directly in director (this is the linuxfabrik package)
Will these objects be synchronized with the satellite without director ?
ok I just reinstall icinga2 on the statellite and configure it like I said previously.
I check the log and I can see the host agent connection but with a message
no Endpoint object found for identity
If I search for the host name of this agent in /etc/icinga2 or /var/lib/icinga2 I don’t find anything, like if the host doesn’t existe on the satellite (so there no endpoint, logic !)
But why my master doesn’t sync this host configuration ? It’s set like in my last screenshot
I finally found why I didn’t found my host in the satellite, on my master all my service template or host template belonged to the master zone. I redefined to the director-global and then the magic happen
Now I have my host visible in the satellite (I reinstall the webui and I can see it)
Last problem, all the checks stay in pending state …
I look in the log on satellite and it communicate well with the agent…
don’t you have an idea to help me with my research ?
I enable the debuglog feature on the agent and when I follow the log I can see this line
notice/CheckerComponent: Pending checkables: 0; Idle checkables: 0; Checks/s: 0
I translate it by “I have no check to do” but I don’t know why ^^
My host on my master server as a lot of services attach on it, on the web UI of the satellite I cas see them but everything stay in pending state…
Pretty sure it’s not a big deal but I don’t know where I can search …
Typical faults:
- version mismatch
- times not in sync
- missing objects
- not connected zones
Thanks for reply
- version 2.14.2-1 on all the chain
- time sync ok on the 3 server (master / satellite / agent)
- zone connected according to the cluster zone check on master / satellite
Missing objects : I think the problem is here but I realy don’t know how I can check / correct it.
I have no error in log, if I check in satellite web UI I can see all the service attach to the host.
But in the host log I see that 0 check was sended…
My object hierachy (maybe something is wrong with that)
- Host object attach to a host template wich only import the hostalive command (ping)
- Service Set (with several services under) attach to host that have a variable “tag” that contain a value (like “ubuntu22” for exemple)
Those objects belong to the following zone :
- host => satellite-service
- host-template => global-template
- service-template => global-template
On the /var/lib/icinga2/api/zones of the satellite I can see the zone and the corresponding content files.
What object am I missing ?