Hi everyone,
I’m relatively new to Icinga and I’m still trying to understand its basics.
Icinga version is:
icinga2 - The Icinga 2 network monitoring daemon (version: r2.12.0-1)
We have two zones, one has an Endpoint with master role and the other Zone has an Endpoint with satellite role.
Here is the zones.conf file on the master:
object Endpoint "master-endpoint" {
}
object Endpoint "satellite-endpoint" {
}
object Zone "master" {
endpoints = [ "master-endpoint" ]
}
object Zone "satellite" {
endpoints = [ "satellite-endpoint" ]
parent = "master"
}
object Zone "global-templates" {
global = true
}
object Zone "director-global" {
global = true
}
Here is the zones.conf file on the satellite:
object Endpoint "master-endpoint" {
host = "master-fqdn"
port = "5665"
}
object Zone "master" {
endpoints = [ "master-endpoint" ]
}
object Endpoint "satellite-endpoint" {
}
object Zone "satellite" {
endpoints = [ "satellite-endpoint" ]
parent = "master"
}
object Zone "global-templates" {
global = true
}
object Zone "director-global" {
global = true
}
I used generic names as “satellite-endpoint”, “master-fqdn” and etc here.
We followed the “Top down config sync” as described on the documentation here:
https://icinga.com/docs/icinga2/latest/doc/06-distributed-monitoring/#top-down-config-sync
On the master, we have three directories in zones.d:
- global-templates: here we have defined checks that should work on all hosts, so in our case, the master endpoint and the satellite endpoint.
- master: here we have defined checks that should work only on the endpoints of the master zone, so only the master endpoint in our case.
- satellite: here we have defined checks that should work only on the endpoints of the satellite zone, so only the satellite endpoint in our case.
All the checks work correctly, but not the new ones. We are trying to create new checks for the satellite endpoint.
We created new scripts and we have put them in /usr/lib/nagios/plugins.
As the checks should work only on the satellite endpoint, we put them in the satellite directory of zones.d. We created a new CheckCommand object and a new Service object for each.
The problem is that the new checks are pending and on the dashboard is shown that the “check source” is the master endpoint, but shouldn’t it be the satellite endpoint as it is for every other check (disk, ping) on the satellite?
I think we have a problem in how zones should be configured but I’m not sure.
I know that CheckCommand objects and Services objects are being created, because of the command “icinga2 object list --type …”). I’ve confronted them, for example, with CheckCommand and Service for the ping check and I can find no difference.
Has anyone got any idea why it isn’t working?
Thank you very much and sorry if I did any mistake in the topic.