# Stuck with "PENDING" agents with "no Endpoint object found for identity"

**URL:** <https://community.icinga.com/t/stuck-with-pending-agents-with-no-endpoint-object-found-for-identity/4698>\
**Category:** Icinga 2\
**Created:** [June 17, 2020, 1:08pm UTC](https://community.icinga.com/t/stuck-with-pending-agents-with-no-endpoint-object-found-for-identity/4698 "2020-06-17T13:08:37Z")\
**Posts on this page:** 17\
**Page:** 2

<div class="post-metadata">

**Author:** ![nhilverling](https://community.icinga.com/user_avatar/community.icinga.com/nhilverling/32/4524_2.png) [@nhilverling](https://community.icinga.com/u/nhilverling)\
**Post date:** [June 22, 2020, 7:44am UTC](https://community.icinga.com/t/stuck-with-pending-agents-with-no-endpoint-object-found-for-identity/4698/21 "2020-06-22T07:44:36Z")

</div>

> [@blackfriar](#):
>
> FOR THE RECORD (before I forget)  
> _icinga2-2.12.0.rc1.42 and icinga2-2.12.0.rc1.48 (fedora) are seriously buggy_  
> _cpu and memory goes to 100% at any stop/reload of the service for up to a few minutes getting the node mostly unresponsive (must be killed with -9 to avoid long waiting). Release is OK._

Nearly forgot about that. That seems to be a new problem we’re not aware of. Could you open an issue on GitHub? [https://github.com/icinga/icinga2/issues](https://github.com/icinga/icinga2/issues)

> [@blackfriar](#):
>
> I’ve resolved pretty much!

I’m happy it worked out. But as long as you’re not using `command_endpoint` or sync the host config via the `zones.d/agent-{01/02}.local` directories your agents will never do any work. You can verify that looking at `Check Source` in Icinga Web 2.

> [@blackfriar](#):
>
> You have suggested me to create a directory within the /etc/icinga2/zones.d/ _(on the master **I assumed** )_ with the name of the node itself which would be seen like another zone by icinga.  
> So I find this confusing nevertheless I’ve tried it anyway and icinga complained with a:  
> `[2020-06-19 14:38:29 +0000] warning/config: Ignoring directory '/etc/icinga2/zones.d/agent-01.local' for unknown zone 'agent-01.local'.`

That’s the way I was aiming for. The problem was, that your master doesn’t know about your agent zones. You can just add the zones and endpoints of your agents to your masters zones.conf and it will then also sync those directories.

> [@blackfriar](#):
>
> Therefore I would expect all the related hosts.conf files to end up into the directory  
> `/etc/icinga2/zones.d/sat-01/`  
> like, for example:  
> `/etc/icinga2/zones.d/sat-01/mon-02.local.conf`  
> `/etc/icinga2/zones.d/sat-01/agent-01.local.conf`  
> `/etc/icinga2/zones.d/sat-01/agent-02.local.conf`  
> as they are all belonging to the **sat-01** zone.

The agents don’t belong to the `sat-01` zone, they have their own zones which are just children of the `sat-01` zone.

---

<div class="post-metadata">

**Author:** ![blackfriar](https://community.icinga.com/letter_avatar_proxy/v4/letter/b/e99b99/32.png) [@blackfriar](https://community.icinga.com/u/blackfriar)\
**Post date:** [June 22, 2020, 11:37am UTC](https://community.icinga.com/t/stuck-with-pending-agents-with-no-endpoint-object-found-for-identity/4698/22 "2020-06-22T11:37:08Z")

</div>

> [@nhilverling](#):
>
> Nearly forgot about that. That seems to be a new problem we’re not aware of. Could you open an issue on GitHub? [https://github.com/icinga/icinga2/issues](https://github.com/icinga/icinga2/issues)

I’ll keep an eye on it as it is not consistent in it’s behavior since I’ve installed the release. If it persists I’ll open an issue.

> [@nhilverling](#):
>
> I’m happy it worked out. But as long as you’re not using `command_endpoint` or sync the host config via the `zones.d/agent-{01/02}.local` directories your agents will never do any work. You can verify that looking at `Check Source` in Icinga Web 2.

Ok so just to be 100%, the `/etc/icinga2/zones.d/agent-{01/02}.local` directories are supposed to be on the **MASTER** , correct?  
And where is this _“check source”_ in Icinga Web 2? I cannot find it anywhere.

> [@nhilverling](#):
>
> The agents don’t belong to the `sat-01` zone, they have their own zones which are just children of the `sat-01` zone.

Thanks for the clarification. That makes sense. From this I evince that within the `sat-01` directory I should **never find any reference to any agent on any file within any satellite directory**. Correct?

---

<div class="post-metadata">

**Author:** ![nhilverling](https://community.icinga.com/user_avatar/community.icinga.com/nhilverling/32/4524_2.png) [@nhilverling](https://community.icinga.com/u/nhilverling)\
**Post date:** [June 22, 2020, 11:56am UTC](https://community.icinga.com/t/stuck-with-pending-agents-with-no-endpoint-object-found-for-identity/4698/23 "2020-06-22T11:56:44Z")

</div>

> [@blackfriar](#):
>
> Ok so just to be 100%, the `/etc/icinga2/zones.d/agent-{01/02}.local` directories are supposed to be on the **MASTER** , correct?

That’s correct, yes. Just make sure the master also knows about those zones/agents (should be configured in zones.conf).

> [@blackfriar](#):
>
> And where is this _“check source”_ in Icinga Web 2? I cannot find it anywhere.

In the host/service details in “Check execution”:

 ![Screenshot 2020-06-22 at 13.49.09](https://community.icinga.com/uploads/default/original/2X/2/245fe73c126497dfd60898262979bfdba1cd8ec9.png)

> [@blackfriar](#):
>
> Thanks for the clarification. That makes sense. From this I evince that within the `sat-01` directory I should **never find any reference to any agent on any file within any satellite directory**. Correct?

In most cases, and definitely in your case, that’s also correct.

---

<div class="post-metadata">

**Author:** ![theFeu](https://community.icinga.com/user_avatar/community.icinga.com/thefeu/32/7277_2.png) [@theFeu](https://community.icinga.com/u/theFeu)\
**Post date:** [June 22, 2020, 12:44pm UTC](https://community.icinga.com/t/stuck-with-pending-agents-with-no-endpoint-object-found-for-identity/4698/24 "2020-06-22T12:44:17Z")

</div>

Hello everyone!

I just wanted to thank everyone who participated in this topic, as it was one of the most elaborate, productive and friendly exchanges I’ve seen in a bit.

This explains in a great detail how to read the documentation and set up the configuration the right way 🙂

Keep it up, stay safe and have a wonderful week,  
Feu

---

<div class="post-metadata">

**Author:** ![blackfriar](https://community.icinga.com/letter_avatar_proxy/v4/letter/b/e99b99/32.png) [@blackfriar](https://community.icinga.com/u/blackfriar)\
**Post date:** [June 22, 2020, 3:47pm UTC](https://community.icinga.com/t/stuck-with-pending-agents-with-no-endpoint-object-found-for-identity/4698/25 "2020-06-22T15:47:07Z")

</div>

I’ve applied a few changes following your instructions and it works.  
Summerising:

> [@rsx](#):
>
> You need to have every zone and endpoint definition for an agent in the chain to that agent e.g. zone and endpoint object for agent-01.local needs to be in zones.conf of mon-01.local, mon-02.local and agent-01.local

**added** the following on **zones.conf** on **master** and **satellite**  
I’m sure I’ve tried that before but the configuration on the sat-01 was still wrong so didn’t fix much and probably puppet removed that afterwards on the satellite and I didn’t notice :-@

> object Endpoint “agent-02.local” {  
> }
> 
> object Endpoint “agent-01.local” {  
> }
> 
> object Zone “agent-02.local” {  
> endpoints = [“agent-02.local”]  
> }
> 
> object Zone “agent-01.local” {  
> endpoints = [“agent-01.local”]  
> }

> [@nhilverling](#):
>
> Move your hosts to `/etc/icinga2/zones.d/agent-01.local/hosts.conf` and `/etc/icinga2/zones.d/agent-02.local/hosts.conf` and your service apply rules to `/etc/icinga2/zones.d/global-templates/services.conf` . That way all the hosts end up where they should and the apply rules will be synced to every endpoint.

removed the agents entries from sat-01 zone hosts.conf, created respective subdirs as you suggested:

[root@mon-01.local:/etc/icinga2/zones.d# tree

```auto
.
├── agent-01.local
│ └── hosts.conf
├── agent-02.local
│ └── hosts.conf
......
......

```

with hosts.conf:

**(AGENT-01)**

```auto
object Host "agent-01.local" {
  address = "X.X.X.X"
  groups = [linux-nodes,]
  display_name = "agent-01.local"
  check_command = "hostalive"
  vars.client_endpoint = name
  zone = "master" //this trick specified in the manual fixed my agents from being permanently pending
}

```

**(AGENT-02)**  
**same as** agent-01.local just -02 hostname

> [@nhilverling](#):
>
> Change your services apply rules assign statement to something like `assign where host.vars.client_endpoint` so it will match on both your agents and the satellite.

modified services in sat-01 zone called sat-\* as you suggested and fixed that too (only didn’t apply to the satellite as well but I’ll figure that out)

I think **this is really it** 😃

Just a couple of things are still bothering me:

1. `icinga2 object list --type host --name agent-01(02).local` on the agents **doesn’t** give me any output **now**
2. `icinga2 object list --type host --name agent-01(02).local` on the master tells me on both: zone = “master”, I assume this is caused by the **aforementioned trick** to make the check **done by** the master zone
3. with such a need to “replicate” “object Endpoint” and “object Zone” on any zones.conf all the way through the agents (master → satellite) that file, on large deployments, may end up being very big. Won’t that affect performances in particular **during startup and on the master** which may have many satellites and agents registered in its file?

Many thanks again.

---

<div class="post-metadata">

**Author:** ![nhilverling](https://community.icinga.com/user_avatar/community.icinga.com/nhilverling/32/4524_2.png) [@nhilverling](https://community.icinga.com/u/nhilverling)\
**Post date:** [June 23, 2020, 6:24am UTC](https://community.icinga.com/t/stuck-with-pending-agents-with-no-endpoint-object-found-for-identity/4698/26 "2020-06-23T06:24:49Z")

</div>

> [@blackfriar](#):
>
> - `icinga2 object list --type host --name agent-01(02).local` on the agents **doesn’t** give me any output **now**
> - `icinga2 object list --type host --name agent-01(02).local` on the master tells me on both: zone = “master”, I assume this is caused by the **aforementioned trick** to make the check **done by** the master zone

This still looks like the agents aren’t getting the config, which is kinda odd. Have a look at your agents logs, maybe they’re not accepting config or something like “we have an authoritative version of the zone’s config” again? Because without **zone = “master”** they should still not be pending, but checked locally by those agents. Which of course it not something you want with the **hostalive** command, but it should still work.

> [@blackfriar](#):
>
> with such a need to “replicate” “object Endpoint” and “object Zone” on any zones.conf all the way through the agents (master → satellite) that file, on large deployments, may end up being very big. Won’t that affect performances in particular **during startup and on the master** which may have many satellites and agents registered in its file?

It will get big, yes. But in large environments zones and endpoints are a very small part of the problem. In environments with 250k+ host/services reloads can take a few minutes.

One think you can do to prevent this file getting messy, is to split it up in multiple files. But if you manage it with Puppet, it’s maybe not that important. You can just replace the content of **zones.conf** with something like **include “zones.conf.d/\*.conf”** and put your zone/endpoint objects into multiple files in a **zones.conf.d** directory.

> [@blackfriar](#):
>
> modified services in sat-01 zone called sat-\* as you suggested and fixed that too (only didn’t apply to the satellite as well but I’ll figure that out)

Did you leave those services in the **zones.d/sat-01** directory? I’d suggest moving those to **zones.d/global-templates** , because your agents won’t get the config otherwise. Also make sure your services are checked by the right endpoint. The easiest way of doing this is by looking at the “Check Source” in Icinga Web 2. All your **sat-** \* services should be checked by **sat-01** or **agent-01/02**.

---

<div class="post-metadata">

**Author:** ![blackfriar](https://community.icinga.com/letter_avatar_proxy/v4/letter/b/e99b99/32.png) [@blackfriar](https://community.icinga.com/u/blackfriar)\
**Post date:** [June 23, 2020, 10:42am UTC](https://community.icinga.com/t/stuck-with-pending-agents-with-no-endpoint-object-found-for-identity/4698/27 "2020-06-23T10:42:33Z")

</div>

This is getting tough as in a fairly long career not many services/systems managed to make me feel stupid. Icinga2 just violently entered into that short list.  
Anyway …

> [@nhilverling](#):
>
> This still looks like the agents aren’t getting the config, which is kinda odd. Have a look at your agents logs, maybe they’re not accepting config or something like “we have an authoritative version of the zone’s config” again? Because without **zone = “master”** they should still not be pending, but checked locally by those agents. Which of course it not something you want with the **hostalive** command, but it should still work.

No, there is no “we have an authoritative version of the zone’s config” message in the logs.  
In fact not much in the logs _(right below)_.

I checked the agent and after an  
`rm -rvf /var/lib/icinga2/api/{packages,zones,zones-stage}/*`

I restarted **agent-01.local** and logs follows:

```auto
[2020-06-23 08:55:04 +0000] information/ApiListener: Started new listener on '[0.0.0.0]:5665'
[2020-06-23 08:55:04 +0000] information/ConfigItem: Activated all objects.
[2020-06-23 08:55:04 +0000] information/ApiListener: Reconnecting to endpoint 'mon-02.local' via host 'X.X.X.X' and port '5665'
[2020-06-23 08:55:04 +0000] information/ApiListener: New client connection for identity 'mon-02.local' to [X.X.X.X]:5665
[2020-06-23 08:55:04 +0000] information/ApiListener: Requesting new certificate for this Icinga instance from endpoint 'mon-02.local'.
[2020-06-23 08:55:04 +0000] information/ApiListener: Sending config updates for endpoint 'mon-02.local' in zone 'sat-01'.
[2020-06-23 08:55:04 +0000] information/ApiListener: Finished sending config file updates for endpoint 'mon-02.local' in zone 'sat-01'.
[2020-06-23 08:55:04 +0000] information/ApiListener: Syncing runtime objects to endpoint 'mon-02.local'.
[2020-06-23 08:55:04 +0000] information/ApiListener: Finished syncing runtime objects to endpoint 'mon-02.local'.
[2020-06-23 08:55:04 +0000] information/ApiListener: Finished sending runtime config updates for endpoint 'mon-02.local' in zone 'sat-01'.
[2020-06-23 08:55:04 +0000] information/ApiListener: Sending replay log for endpoint 'mon-02.local' in zone 'sat-01'.
[2020-06-23 08:55:04 +0000] information/ApiListener: Finished sending replay log for endpoint 'mon-02.local' in zone 'sat-01'.
[2020-06-23 08:55:04 +0000] information/ApiListener: Finished syncing endpoint 'mon-02.local' in zone 'sat-01'.
[2020-06-23 08:55:04 +0000] information/ApiListener: Finished reconnecting to endpoint 'mon-02.local' via host 'X.X.X.X' and port '5665'
[2020-06-23 08:55:14 +0000] information/WorkQueue: #5 (ApiListener, RelayQueue) items: 0, rate: 0/s (0/min 0/5min 0/15min);
[2020-06-23 08:55:14 +0000] information/WorkQueue: #6 (ApiListener, SyncQueue) items: 0, rate: 0/s (0/min 0/5min 0/15min);

```

The current directory structure:

```auto
root@agent-01.local:/var/lib/icinga2/api# tree -a
.
|-- log
| |-- 1592837449
| |-- 1592837529
| |-- 1592837948
| |-- 1592846847
| `-- current
|-- packages
| `-- _api
| |-- active-stage
| |-- active.conf
| |-- eb63c03c-4037-440c-8385-394e6a3e304c
| | |-- conf.d
| | |-- include.conf
| | `-- zones.d
| `-- include.conf
|-- repository
|-- zones
`-- zones-stage

9 directories, 9 files

```

By the way I’ve noticed that `Check Source` value is **mon-01.local** _(the master)_ for **any** node except for the satellite which has itself as source which is probably wrong. I’ve removed the `zone = master` to the hosts file of the agents _(on the master)_ to verify the PENDING issue.  
A quick glance on the Icingaweb2:

**Check execution**

```auto
Command hostalive Process check result
Check Source mon-01.local
Reachable yes 
Last check 53m 24s ago (Check now)
Next check in -42m 46s Reschedule
Check attempts 1/3 (hard state)
Check execution time	4.12s
Check latency 0.001154s

```

Something looks wrong with the check and that’s why the _pending thing_. The only difference now is that it is not in PENDING _(perhaps will become in few hours)_ but is UP but with a little clock icon.  
Another difference is that if I do the check manually it will respond and the clock will go away. But it looks like there won’t be any automatic check at the end of the timer as the negative number keeps raising in value at the `Next check` field.

**(ON THE MASTER)**  
All the nodes seem to be in the right zone _(at least to me)_.

`# icinga2 object list --type host`

```auto
Object 'mon-01.local' of type 'Host':
  % declared in '/etc/icinga2/zones.d/master/hosts.conf', lines 3:1-3:45
  * __name = "mon-01.local"
  * action_url = ""
  * address = "X.X.X.X"
    % = modified in '/etc/icinga2/zones.d/master/hosts.conf', lines 4:3-4:25
  * address6 = ""
  * check_command = "hostalive"
    % = modified in '/etc/icinga2/zones.d/master/hosts.conf', lines 6:3-6:29
  * check_interval = 300
  * check_period = ""
  * check_timeout = null
  * command_endpoint = ""
  * display_name = "mon-01.local"
    % = modified in '/etc/icinga2/zones.d/master/hosts.conf', lines 5:3-5:50
  * enable_active_checks = true
  * enable_event_handler = true
  * enable_flapping = false
  * enable_notifications = true
  * enable_passive_checks = true
  * enable_perfdata = true
  * event_command = ""
  * flapping_threshold = 0
  * flapping_threshold_high = 30
  * flapping_threshold_low = 25
  * groups = []
  * icon_image = ""
  * icon_image_alt = ""
  * max_check_attempts = 3
  * name = "mon-01.local"
  * notes = ""
  * notes_url = ""
  * package = "_etc"
  * retry_interval = 60
  * source_location
    * first_column = 1
    * first_line = 3
    * last_column = 45
    * last_line = 3
    * path = "/etc/icinga2/zones.d/master/hosts.conf"
  * templates = ["mon-01.local"]
    % = modified in '/etc/icinga2/zones.d/master/hosts.conf', lines 3:1-3:45
  * type = "Host"
  * vars = null
  * volatile = false
  * zone = "master"

Object 'agent-02.local' of type 'Host':
  % declared in '/etc/icinga2/zones.d/agent-02.local/hosts.conf', lines 3:1-3:46
  * __name = "agent-02.local"
  * action_url = ""
  * address = "X.X.X.X"
    % = modified in '/etc/icinga2/zones.d/agent-02.local/hosts.conf', lines 4:3-4:25
  * address6 = ""
  * check_command = "hostalive"
    % = modified in '/etc/icinga2/zones.d/agent-02.local/hosts.conf', lines 6:3-6:29
  * check_interval = 300
  * check_period = ""
  * check_timeout = null
  * command_endpoint = ""
  * display_name = "agent-02.local"
    % = modified in '/etc/icinga2/zones.d/agent-02.local/hosts.conf', lines 5:3-5:51
  * enable_active_checks = true
  * enable_event_handler = true
  * enable_flapping = false
  * enable_notifications = true
  * enable_passive_checks = true
  * enable_perfdata = true
  * event_command = ""
  * flapping_threshold = 0
  * flapping_threshold_high = 30
  * flapping_threshold_low = 25
  * groups = []
  * icon_image = ""
  * icon_image_alt = ""
  * max_check_attempts = 3
  * name = "agent-02.local"
  * notes = ""
  * notes_url = ""
  * package = "_etc"
  * retry_interval = 60
  * source_location
    * first_column = 1
    * first_line = 3
    * last_column = 46
    * last_line = 3
    * path = "/etc/icinga2/zones.d/agent-02.local/hosts.conf"
  * templates = ["agent-02.local"]
    % = modified in '/etc/icinga2/zones.d/agent-02.local/hosts.conf', lines 3:1-3:46
  * type = "Host"
  * vars
    * client_endpoint = "agent-02.local"
      % = modified in '/etc/icinga2/zones.d/agent-02.local/hosts.conf', lines 8:3-8:29
  * volatile = false
  * zone = "agent-02.local"

Object 'agent-01.local' of type 'Host':
  % declared in '/etc/icinga2/zones.d/agent-01.local/hosts.conf', lines 3:1-3:47
  * __name = "agent-01.local"
  * action_url = ""
  * address = "X.X.X.X"
    % = modified in '/etc/icinga2/zones.d/agent-01.local/hosts.conf', lines 4:3-4:25
  * address6 = ""
  * check_command = "hostalive"
    % = modified in '/etc/icinga2/zones.d/agent-01.local/hosts.conf', lines 6:3-6:29
  * check_interval = 300
  * check_period = ""
  * check_timeout = null
  * command_endpoint = ""
  * display_name = "agent-01.local"
    % = modified in '/etc/icinga2/zones.d/agent-01.local/hosts.conf', lines 5:3-5:52
  * enable_active_checks = true
  * enable_event_handler = true
  * enable_flapping = false
  * enable_notifications = true
  * enable_passive_checks = true
  * enable_perfdata = true
  * event_command = ""
  * flapping_threshold = 0
  * flapping_threshold_high = 30
  * flapping_threshold_low = 25
  * groups = []
  * icon_image = ""
  * icon_image_alt = ""
  * max_check_attempts = 3
  * name = "agent-01.local"
  * notes = ""
  * notes_url = ""
  * package = "_etc"
  * retry_interval = 60
  * source_location
    * first_column = 1
    * first_line = 3
    * last_column = 47
    * last_line = 3
    * path = "/etc/icinga2/zones.d/agent-01.local/hosts.conf"
  * templates = ["agent-01.local"]
    % = modified in '/etc/icinga2/zones.d/agent-01.local/hosts.conf', lines 3:1-3:47
  * type = "Host"
  * vars
    * client_endpoint = "agent-01.local"
      % = modified in '/etc/icinga2/zones.d/agent-01.local/hosts.conf', lines 8:3-8:29
  * volatile = false
  * zone = "agent-01.local"

Object 'mon-02.local' of type 'Host':
  % declared in '/etc/icinga2/zones.d/sat-01/hosts.conf', lines 3:1-3:45
  * __name = "mon-02.local"
  * action_url = ""
  * address = "X.X.X.X"
    % = modified in '/etc/icinga2/zones.d/sat-01/hosts.conf', lines 4:3-4:25
  * address6 = ""
  * check_command = "hostalive"
    % = modified in '/etc/icinga2/zones.d/sat-01/hosts.conf', lines 6:3-6:29
  * check_interval = 300
  * check_period = ""
  * check_timeout = null
  * command_endpoint = ""
  * display_name = "mon-02.local"
    % = modified in '/etc/icinga2/zones.d/sat-01/hosts.conf', lines 5:3-5:50
  * enable_active_checks = true
  * enable_event_handler = true
  * enable_flapping = false
  * enable_notifications = true
  * enable_passive_checks = true
  * enable_perfdata = true
  * event_command = ""
  * flapping_threshold = 0
  * flapping_threshold_high = 30
  * flapping_threshold_low = 25
  * groups = []
  * icon_image = ""
  * icon_image_alt = ""
  * max_check_attempts = 3
  * name = "mon-02.local"
  * notes = ""
  * notes_url = ""
  * package = "_etc"
  * retry_interval = 60
  * source_location
    * first_column = 1
    * first_line = 3
    * last_column = 45
    * last_line = 3
    * path = "/etc/icinga2/zones.d/sat-01/hosts.conf"
  * templates = ["mon-02.local"]
    % = modified in '/etc/icinga2/zones.d/sat-01/hosts.conf', lines 3:1-3:45
  * type = "Host"
  * vars = null
  * volatile = false
  * zone = "sat-01"

```

`[root@mon-01.local]# icinga2 object list --type Zone`

```auto
Object 'master' of type 'Zone':
  % declared in '/etc/icinga2/zones.conf', lines 27:1-27:20
  * __name = "master"
  * endpoints = ["mon-01.local"]
    % = modified in '/etc/icinga2/zones.conf', lines 28:3-28:52
  * global = false
  * name = "master"
  * package = "_etc"
  * parent = ""
  * source_location
    * first_column = 1
    * first_line = 27
    * last_column = 20
    * last_line = 27
    * path = "/etc/icinga2/zones.conf"
  * templates = ["master"]
    % = modified in '/etc/icinga2/zones.conf', lines 27:1-27:20
  * type = "Zone"
  * zone = ""

Object 'global-templates' of type 'Zone':
  % declared in '/etc/icinga2/zones.conf', lines 23:1-23:30
  * __name = "global-templates"
  * endpoints = null
  * global = true
    % = modified in '/etc/icinga2/zones.conf', lines 24:3-24:15
  * name = "global-templates"
  * package = "_etc"
  * parent = ""
  * source_location
    * first_column = 1
    * first_line = 23
    * last_column = 30
    * last_line = 23
    * path = "/etc/icinga2/zones.conf"
  * templates = ["global-templates"]
    % = modified in '/etc/icinga2/zones.conf', lines 23:1-23:30
  * type = "Zone"
  * zone = ""

Object 'sat-01' of type 'Zone':
  % declared in '/etc/icinga2/zones.conf', lines 31:1-31:27
  * __name = "sat-01"
  * endpoints = ["mon-02.local"]
    % = modified in '/etc/icinga2/zones.conf', lines 32:3-32:52
  * global = false
  * name = "sat-01"
  * package = "_etc"
  * parent = "master"
    % = modified in '/etc/icinga2/zones.conf', lines 33:3-33:19
  * source_location
    * first_column = 1
    * first_line = 31
    * last_column = 27
    * last_line = 31
    * path = "/etc/icinga2/zones.conf"
  * templates = ["sat-01"]
    % = modified in '/etc/icinga2/zones.conf', lines 31:1-31:27
  * type = "Zone"
  * zone = ""

Object 'agent-02.local' of type 'Zone':
  % declared in '/etc/icinga2/zones.conf', lines 19:1-19:46
  * __name = "agent-02.local"
  * endpoints = ["agent-02.local"]
    % = modified in '/etc/icinga2/zones.conf', lines 20:3-20:53
  * global = false
  * name = "agent-02.local"
  * package = "_etc"
  * parent = ""
  * source_location
    * first_column = 1
    * first_line = 19
    * last_column = 46
    * last_line = 19
    * path = "/etc/icinga2/zones.conf"
  * templates = ["agent-02.local"]
    % = modified in '/etc/icinga2/zones.conf', lines 19:1-19:46
  * type = "Zone"
  * zone = ""

Object 'agent-01.local' of type 'Zone':
  % declared in '/etc/icinga2/zones.conf', lines 15:1-15:47
  * __name = "agent-01.local"
  * endpoints = ["agent-01.local"]
    % = modified in '/etc/icinga2/zones.conf', lines 16:3-16:54
  * global = false
  * name = "agent-01.local"
  * package = "_etc"
  * parent = ""
  * source_location
    * first_column = 1
    * first_line = 15
    * last_column = 47
    * last_line = 15
    * path = "/etc/icinga2/zones.conf"
  * templates = ["agent-01.local"]
    % = modified in '/etc/icinga2/zones.conf', lines 15:1-15:47
  * type = "Zone"
  * zone = ""

```

But the same command on the satellite gives only the output for the satellite itself which looks like:

`root@mon-02.local# icinga2 object list --type host`

```auto
Object 'mon-02.local' of type 'Host':
  % declared in '/var/lib/icinga2/api/zones/sat-01/_etc/hosts.conf', lines 3:1-3:45
  * __name = "mon-02.local"
  * action_url = ""
  * address = "X.X.X.X"
    % = modified in '/var/lib/icinga2/api/zones/sat-01/_etc/hosts.conf', lines 4:3-4:25
  * address6 = ""
  * check_command = "hostalive"
    % = modified in '/var/lib/icinga2/api/zones/sat-01/_etc/hosts.conf', lines 6:3-6:29
  * check_interval = 300
  * check_period = ""
  * check_timeout = null
  * command_endpoint = ""
  * display_name = "mon-02.local"
    % = modified in '/var/lib/icinga2/api/zones/sat-01/_etc/hosts.conf', lines 5:3-5:50
  * enable_active_checks = true
  * enable_event_handler = true
  * enable_flapping = false
  * enable_notifications = true
  * enable_passive_checks = true
  * enable_perfdata = true
  * event_command = ""
  * flapping_threshold = 0
  * flapping_threshold_high = 30
  * flapping_threshold_low = 25
  * groups = []
  * icon_image = ""
  * icon_image_alt = ""
  * max_check_attempts = 3
  * name = "mon-02.local"
  * notes = ""
  * notes_url = ""
  * package = "_cluster"
  * retry_interval = 60
  * source_location
    * first_column = 1
    * first_line = 3
    * last_column = 45
    * last_line = 3
    * path = "/var/lib/icinga2/api/zones/sat-01/_etc/hosts.conf"
  * templates = ["mon-02.local"]
    % = modified in '/var/lib/icinga2/api/zones/sat-01/_etc/hosts.conf', lines 3:1-3:45
  * type = "Host"
  * vars = null
  * volatile = false
  * zone = "sat-01"

```

**while the zones look ok** or at least are all there on the satellite:

`root@mon-02.local# icinga2 object list --type Zone`

```auto
Object 'master' of type 'Zone':
  % declared in '/etc/icinga2/zones.conf', lines 28:1-28:20
  * __name = "master"
  * endpoints = ["mon-01.local"]
    % = modified in '/etc/icinga2/zones.conf', lines 29:3-29:52
  * global = false
  * name = "master"
  * package = "_etc"
  * parent = ""
  * source_location
    * first_column = 1
    * first_line = 28
    * last_column = 20
    * last_line = 28
    * path = "/etc/icinga2/zones.conf"
  * templates = ["master"]
    % = modified in '/etc/icinga2/zones.conf', lines 28:1-28:20
  * type = "Zone"
  * zone = ""

Object 'sat-01' of type 'Zone':
  % declared in '/etc/icinga2/zones.conf', lines 32:1-32:27
  * __name = "sat-01"
  * endpoints = ["mon-02.local"]
    % = modified in '/etc/icinga2/zones.conf', lines 33:3-33:52
  * global = false
  * name = "sat-01"
  * package = "_etc"
  * parent = "master"
    % = modified in '/etc/icinga2/zones.conf', lines 34:3-34:19
  * source_location
    * first_column = 1
    * first_line = 32
    * last_column = 27
    * last_line = 32
    * path = "/etc/icinga2/zones.conf"
  * templates = ["sat-01"]
    % = modified in '/etc/icinga2/zones.conf', lines 32:1-32:27
  * type = "Zone"
  * zone = ""

Object 'agent-02.local' of type 'Zone':
  % declared in '/etc/icinga2/zones.conf', lines 20:1-20:46
  * __name = "agent-02.local"
  * endpoints = ["agent-02.local"]
    % = modified in '/etc/icinga2/zones.conf', lines 21:3-21:53
  * global = false
  * name = "agent-02.local"
  * package = "_etc"
  * parent = ""
  * source_location
    * first_column = 1
    * first_line = 20
    * last_column = 46
    * last_line = 20
    * path = "/etc/icinga2/zones.conf"
  * templates = ["agent-02.local"]
    % = modified in '/etc/icinga2/zones.conf', lines 20:1-20:46
  * type = "Zone"
  * zone = ""

Object 'global-templates' of type 'Zone':
  % declared in '/etc/icinga2/zones.conf', lines 24:1-24:30
  * __name = "global-templates"
  * endpoints = null
  * global = true
    % = modified in '/etc/icinga2/zones.conf', lines 25:3-25:15
  * name = "global-templates"
  * package = "_etc"
  * parent = ""
  * source_location
    * first_column = 1
    * first_line = 24
    * last_column = 30
    * last_line = 24
    * path = "/etc/icinga2/zones.conf"
  * templates = ["global-templates"]
    % = modified in '/etc/icinga2/zones.conf', lines 24:1-24:30
  * type = "Zone"
  * zone = ""

Object 'agent-01.local' of type 'Zone':
  % declared in '/etc/icinga2/zones.conf', lines 16:1-16:47
  * __name = "agent-01.local"
  * endpoints = ["agent-01.local"]
    % = modified in '/etc/icinga2/zones.conf', lines 17:3-17:54
  * global = false
  * name = "agent-01.local"
  * package = "_etc"
  * parent = ""
  * source_location
    * first_column = 1
    * first_line = 16
    * last_column = 47
    * last_line = 16
    * path = "/etc/icinga2/zones.conf"
  * templates = ["agent-01.local"]
    % = modified in '/etc/icinga2/zones.conf', lines 16:1-16:47
  * type = "Zone"
  * zone = ""

```

ZONE FILES

`root@agent-01.local# cat /etc/icinga2/zones.conf` **(AGENT-01)**

```auto
object Endpoint "agent-01.local" {
}

object Endpoint "mon-02.local" {
  host = "X.X.X.X"
}

object Zone "agent-01.local" {
  endpoints = ["agent-01.local",]
  parent = "sat-01"
}

object Zone "global-templates" {
  global = true
}

object Zone "sat-01" {
  endpoints = ["mon-02.local",]
}

```

`root@mon-02.local# cat /etc/icinga2/zones.conf` **(SATELLITE)**

```auto
object Endpoint "agent-01.local" {
}

object Endpoint "mon-01.local" {
  host = "X.X.X.X"
}

object Endpoint "mon-02.local" {
}

object Endpoint "agent-02.local" {
}

object Zone "agent-01.local" {
  endpoints = ["agent-01.local",]
}

object Zone "agent-02.local" {
  endpoints = ["agent-02.local",]
}

object Zone "global-templates" {
  global = true
}

object Zone "master" {
  endpoints = ["mon-01.local",]
}

object Zone "sat-01" {
  endpoints = ["mon-02.local",]
  parent = "master"
}

```

`root@mon-01.local#cat /etc/icinga2/zones.conf` **(MASTER)**

```auto
object Endpoint "agent-01.local" {
}

object Endpoint "mon-01.local" {
}

object Endpoint "mon-02.local" {
}

object Endpoint "agent-02.local" {
}

object Zone "agent-01.local" {
  endpoints = ["agent-01.local",]
}

object Zone "agent-02.local" {
  endpoints = ["agent-02.local",]
}

object Zone "global-templates" {
  global = true
}

object Zone "master" {
  endpoints = ["mon-01.local",]
}

object Zone "sat-01" {
  endpoints = ["mon-02.local",]
  parent = "master"
}

```

> [@nhilverling](#):
>
> Did you leave those services in the **zones.d/sat-01** directory? I’d suggest moving those to **zones.d/global-templates** , because your agents won’t get the config otherwise. Also make sure your services are checked by the right endpoint. The easiest way of doing this is by looking at the “Check Source” in Icinga Web 2. All your **sat-** \* services should be checked by **sat-01** or **agent-01/02**.

I feel like this is a secondary issue right now. I’d rather fix the core then I’ll spend time to tune the services on my own without bothering anyone here furthermore.

> [@nhilverling](#):
>
> One think you can do to prevent this file getting messy, is to split it up in multiple files. But if you manage it with Puppet, it’s maybe not that important. You can just replace the content of **zones.conf** with something like **include “zones.conf.d/\*.conf”** and put your zone/endpoint objects into multiple files in a **zones.conf.d** directory.

Thanks for the info and thanks for your time.

---

<div class="post-metadata">

**Author:** ![nhilverling](https://community.icinga.com/user_avatar/community.icinga.com/nhilverling/32/4524_2.png) [@nhilverling](https://community.icinga.com/u/nhilverling)\
**Post date:** [June 23, 2020, 11:32am UTC](https://community.icinga.com/t/stuck-with-pending-agents-with-no-endpoint-object-found-for-identity/4698/28 "2020-06-23T11:32:50Z")

</div>

> [@blackfriar](#):
>
> This is getting tough as in a fairly long career not many services/systems managed to make me feel stupid. Icinga2 just violently entered into that short list.

Yeah, Icinga can be quite complex and confusing at first, but very powerful and flexible when you understand it. You’re already dealing with one of the harder parts of Icinga, which means concepts aren’t getting much harder after that.

Okay, looking at your zone files helped a lot. You’re missing the **parent = “sat-01”** for your agent zones on your satellite and master. Without that those nodes don’t know that they have to sync config to them. That should fix your agents hosts being PENDING or overdue(little clock icon).

> [@blackfriar](#):
>
> By the way I’ve noticed that `Check Source` value is **mon-01.local** _(the master)_ for **any** node except for the satellite which has itself as source which is probably wrong. I’ve removed the `zone = master` to the hosts file of the agents _(on the master)_ to verify the PENDING issue.

After fixing the issue mentioned above, you should end up with all 3 hosts being checked (Check Source) by their node. That means that all the syncing stuff finally worked. But you’ll still need to add the `zone = "master"` to make sure that the `hostalive` check isn’t executed locally on your agents/satellite.

Summary: After adding `zone = "master"`, you should be able to see your hosts on your agents using `icinga2 object list --type host` and your check source should be your master. That will provide the right setup for your apply rules, so your services are finally checked locally on your agents.

> [@blackfriar](#):
>
> Thanks for the info and thanks for your time.

I’m happy to help!

---

<div class="post-metadata">

**Author:** ![blackfriar](https://community.icinga.com/letter_avatar_proxy/v4/letter/b/e99b99/32.png) [@blackfriar](https://community.icinga.com/u/blackfriar)\
**Post date:** [June 23, 2020, 2:14pm UTC](https://community.icinga.com/t/stuck-with-pending-agents-with-no-endpoint-object-found-for-identity/4698/29 "2020-06-23T14:14:06Z")

</div>

> [@nhilverling](#):
>
> Okay, looking at your zone files helped a lot. You’re missing the **parent = “sat-01”** for your agent zones on your satellite and master. Without that those nodes don’t know that they have to sync config to them. That should fix your agents hosts being PENDING or overdue(little clock icon).

Modified and applied:

```auto
object Zone "agent-01.local" {
   endpoints = ["agent-01.local",]
+ parent = "sat-01"
 }

 object Zone "agent-02.local" {
   endpoints = ["agent-02.local",]
+ parent = "sat-01"
 }

 object Zone "global-templates" {

```

And `zone = master` re-added on the agents hosts files. The only thing that changed is that the check was immediately done on the hosts and the little clock went away. So basically the condition got reverted to it’s previous state when `zone = master` was there.

Unfortunately there is still no output to the command on the agents:  
`icinga2 object list --type host`  
only to the `--type Zone` variant and it follows for the agent-01.local

```auto
root@agent-01.local# icinga2 object list --type Zone
Object 'sat-01' of type 'Zone':
  % declared in '/etc/icinga2/zones.conf', lines 19:1-19:27
  * __name = "sat-01"
  * endpoints = ["mon-02.local"]
    % = modified in '/etc/icinga2/zones.conf', lines 20:3-20:52
  * global = false
  * name = "sat-01"
  * package = "_etc"
  * parent = ""
  * source_location
    * first_column = 1
    * first_line = 19
    * last_column = 27
    * last_line = 19
    * path = "/etc/icinga2/zones.conf"
  * templates = ["sat-01"]
    % = modified in '/etc/icinga2/zones.conf', lines 19:1-19:27
  * type = "Zone"
  * zone = ""

Object 'global-templates' of type 'Zone':
  % declared in '/etc/icinga2/zones.conf', lines 15:1-15:30
  * __name = "global-templates"
  * endpoints = null
  * global = true
    % = modified in '/etc/icinga2/zones.conf', lines 16:3-16:15
  * name = "global-templates"
  * package = "_etc"
  * parent = ""
  * source_location
    * first_column = 1
    * first_line = 15
    * last_column = 30
    * last_line = 15
    * path = "/etc/icinga2/zones.conf"
  * templates = ["global-templates"]
    % = modified in '/etc/icinga2/zones.conf', lines 15:1-15:30
  * type = "Zone"
  * zone = ""

Object 'agent-01.local' of type 'Zone':
  % declared in '/etc/icinga2/zones.conf', lines 10:1-10:47
  * __name = "agent-01.local"
  * endpoints = ["agent-01.local"]
    % = modified in '/etc/icinga2/zones.conf', lines 11:3-11:54
  * global = false
  * name = "agent-01.local"
  * package = "_etc"
  * parent = "sat-01"
    % = modified in '/etc/icinga2/zones.conf', lines 12:3-12:26
  * source_location
    * first_column = 1
    * first_line = 10
    * last_column = 47
    * last_line = 10
    * path = "/etc/icinga2/zones.conf"
  * templates = ["agent-01.local"]
    % = modified in '/etc/icinga2/zones.conf', lines 10:1-10:47
  * type = "Zone"
  * zone = ""

```

**BUT THEN**  
Out of desperation, I’ve tried to also add  
`parent = "sat-01"`  
to the satellite zones.conf and it wasn’t very happy about that:

```auto
[2020-06-23 13:33:11 +0000] information/cli: Icinga application loader (version: r2.11.4-1)
[2020-06-23 13:33:11 +0000] information/cli: Loading configuration file(s).
[2020-06-23 13:33:11 +0000] information/ConfigItem: Committing config item(s).
[2020-06-23 13:33:11 +0000] information/ApiListener: My API identity: agent-01.local
[2020-06-23 13:33:12 +0000] critical/config: Error: Validation failed for object 'agent-01.local' of type 'Host'; Attribute 'zone': Object 'master' of type 'Zone' does not exist.
Location: in /var/lib/icinga2/api/zones-stage//agent-01.local/_etc/hosts.conf: 7:3-7:17
/var/lib/icinga2/api/zones-stage//agent-01.local/_etc/hosts.conf(5): display_name = "agent-01.local"
/var/lib/icinga2/api/zones-stage//agent-01.local/_etc/hosts.conf(6): check_command = "hostalive"
/var/lib/icinga2/api/zones-stage//agent-01.local/_etc/hosts.conf(7): zone = "master"
                                                                                          ^^^^^^^^^^^^^^^
/var/lib/icinga2/api/zones-stage//agent-01.local/_etc/hosts.conf(8): vars.client_endpoint = name
/var/lib/icinga2/api/zones-stage//agent-01.local/_etc/hosts.conf(9): }

[2020-06-23 13:33:12 +0000] critical/config: 1 error
[2020-06-23 13:33:12 +0000] critical/cli: Config validation failed. Re-run with 'icinga2 daemon -C' after fixing the config.

```

**but then** I’ve recognized **that one** as the entry _(the trick)_ in the master.  
Removed that from the master I got some real change:

```auto
[2020-06-23 13:37:01 +0000] information/ApiListener: Reconnecting to endpoint 'mon-02.local' via host 'X.X.X.X' and port '5665'
[2020-06-23 13:37:01 +0000] information/ApiListener: New client connection for identity 'mon-02.local' to [X.X.X.X]:5665
[2020-06-23 13:37:01 +0000] information/ApiListener: Requesting new certificate for this Icinga instance from endpoint 'mon-02.local'.
[2020-06-23 13:37:01 +0000] information/ApiListener: Sending config updates for endpoint 'mon-02.local' in zone 'sat-01'.
[2020-06-23 13:37:01 +0000] information/ApiListener: Finished sending config file updates for endpoint 'mon-02.local' in zone 'sat-01'.
[2020-06-23 13:37:01 +0000] information/ApiListener: Syncing runtime objects to endpoint 'mon-02.local'.
[2020-06-23 13:37:01 +0000] information/ApiListener: Finished syncing runtime objects to endpoint 'mon-02.local'.
[2020-06-23 13:37:01 +0000] information/ApiListener: Finished sending runtime config updates for endpoint 'mon-02.local' in zone 'sat-01'.
[2020-06-23 13:37:01 +0000] information/ApiListener: Sending replay log for endpoint 'mon-02.local' in zone 'sat-01'.
[2020-06-23 13:37:01 +0000] information/ApiListener: Finished sending replay log for endpoint 'mon-02.local' in zone 'sat-01'.
[2020-06-23 13:37:01 +0000] information/ApiListener: Finished syncing endpoint 'mon-02.local' in zone 'sat-01'.
[2020-06-23 13:37:01 +0000] information/ApiListener: Finished reconnecting to endpoint 'mon-02.local' via host 'X.X.X.X' and port '5665'
[2020-06-23 13:37:01 +0000] information/ApiListener: Applying config update from endpoint 'mon-02.local' of zone 'sat-01'.
[2020-06-23 13:37:01 +0000] information/ApiListener: Received configuration for zone 'agent-01.local' from endpoint 'mon-02.local'. Comparing the timestamp and checksums.
[2020-06-23 13:37:01 +0000] information/ApiListener: Stage: Updating received configuration file '/var/lib/icinga2/api/zones-stage/agent-01.local//_etc/hosts.conf' for zone 'agent-01.local'.
[2020-06-23 13:37:01 +0000] information/ApiListener: Applying configuration file update for path '/var/lib/icinga2/api/zones-stage/agent-01.local' (362 Bytes).
[2020-06-23 13:37:01 +0000] information/ApiListener: Received configuration for zone 'global-templates' from endpoint 'mon-02.local'. Comparing the timestamp and checksums.
[2020-06-23 13:37:01 +0000] information/ApiListener: Stage: Updating received configuration file '/var/lib/icinga2/api/zones-stage/global-templates//_etc/commands.conf' for zone 'global-templates'.
[2020-06-23 13:37:01 +0000] information/ApiListener: Stage: Updating received configuration file '/var/lib/icinga2/api/zones-stage/global-templates//_etc/groups.conf' for zone 'global-templates'.
[2020-06-23 13:37:01 +0000] information/ApiListener: Stage: Updating received configuration file '/var/lib/icinga2/api/zones-stage/global-templates//_etc/notifications.conf' for zone 'global-templates'.
[2020-06-23 13:37:01 +0000] information/ApiListener: Stage: Updating received configuration file '/var/lib/icinga2/api/zones-stage/global-templates//_etc/services.conf' for zone 'global-templates'.
[2020-06-23 13:37:01 +0000] information/ApiListener: Stage: Updating received configuration file '/var/lib/icinga2/api/zones-stage/global-templates//_etc/templates.conf' for zone 'global-templates'.
[2020-06-23 13:37:01 +0000] information/ApiListener: Stage: Updating received configuration file '/var/lib/icinga2/api/zones-stage/global-templates//_etc/timeperiods.conf' for zone 'global-templates'.
[2020-06-23 13:37:01 +0000] information/ApiListener: Stage: Updating received configuration file '/var/lib/icinga2/api/zones-stage/global-templates//_etc/users.conf' for zone 'global-templates'.
[2020-06-23 13:37:01 +0000] information/ApiListener: Applying configuration file update for path '/var/lib/icinga2/api/zones-stage/global-templates' (11618 Bytes).
[2020-06-23 13:37:01 +0000] information/ApiListener: Received configuration updates (2) from endpoint 'mon-02.local' are different to production, triggering validation and reload.
[2020-06-23 13:37:01 +0000] information/ApiListener: Config validation for stage '/var/lib/icinga2/api/zones-stage/' was OK, replacing into '/var/lib/icinga2/api/zones/' and triggering reload.
[2020-06-23 13:37:01 +0000] information/ApiListener: Copying file 'agent-01.local//.checksums' from config sync staging to production zones directory.
[2020-06-23 13:37:01 +0000] information/ApiListener: Copying file 'agent-01.local//.timestamp' from config sync staging to production zones directory.
[2020-06-23 13:37:01 +0000] information/ApiListener: Copying file 'agent-01.local//_etc/hosts.conf' from config sync staging to production zones directory.
[2020-06-23 13:37:01 +0000] information/ApiListener: Copying file 'global-templates//.checksums' from config sync staging to production zones directory.
[2020-06-23 13:37:01 +0000] information/ApiListener: Copying file 'global-templates//.timestamp' from config sync staging to production zones directory.
[2020-06-23 13:37:01 +0000] information/ApiListener: Copying file 'global-templates//_etc/commands.conf' from config sync staging to production zones directory.
[2020-06-23 13:37:01 +0000] information/ApiListener: Copying file 'global-templates//_etc/groups.conf' from config sync staging to production zones directory.
[2020-06-23 13:37:01 +0000] information/ApiListener: Copying file 'global-templates//_etc/notifications.conf' from config sync staging to production zones directory.
[2020-06-23 13:37:01 +0000] information/ApiListener: Copying file 'global-templates//_etc/services.conf' from config sync staging to production zones directory.
[2020-06-23 13:37:01 +0000] information/ApiListener: Copying file 'global-templates//_etc/templates.conf' from config sync staging to production zones directory.
[2020-06-23 13:37:01 +0000] information/ApiListener: Copying file 'global-templates//_etc/timeperiods.conf' from config sync staging to production zones directory.
[2020-06-23 13:37:01 +0000] information/ApiListener: Copying file 'global-templates//_etc/users.conf' from config sync staging to production zones directory.
[2020-06-23 13:37:02 +0000] information/Application: Received request to shut down.
[2020-06-23 13:37:02 +0000] information/Application: Shutting down...
[2020-06-23 13:37:02 +0000] information/ApiListener: 'api' stopped.
[2020-06-23 13:37:02 +0000] information/FileLogger: 'main-log' started.
[2020-06-23 13:37:02 +0000] information/ApiListener: 'api' started.
[2020-06-23 13:37:02 +0000] information/ApiListener: Started new listener on '[0.0.0.0]:5665'
[2020-06-23 13:37:02 +0000] information/ConfigItem: Activated all objects.
[2020-06-23 13:37:02 +0000] information/ApiListener: Reconnecting to endpoint 'mon-02.local' via host 'X.X.X.X' and port '5665'
[2020-06-23 13:37:02 +0000] information/ApiListener: New client connection for identity 'mon-02.local' to [X.X.X.X]:5665
[2020-06-23 13:37:02 +0000] information/ApiListener: Requesting new certificate for this Icinga instance from endpoint 'mon-02.local'.
[2020-06-23 13:37:02 +0000] information/ApiListener: Sending config updates for endpoint 'mon-02.local' in zone 'sat-01'.
[2020-06-23 13:37:02 +0000] information/ApiListener: Finished sending config file updates for endpoint 'mon-02.local' in zone 'sat-01'.
[2020-06-23 13:37:02 +0000] information/ApiListener: Syncing runtime objects to endpoint 'mon-02.local'.
[2020-06-23 13:37:02 +0000] information/ApiListener: Finished syncing runtime objects to endpoint 'mon-02.local'.
[2020-06-23 13:37:02 +0000] information/ApiListener: Finished sending runtime config updates for endpoint 'mon-02.local' in zone 'sat-01'.
[2020-06-23 13:37:02 +0000] information/ApiListener: Sending replay log for endpoint 'mon-02.local' in zone 'sat-01'.
[2020-06-23 13:37:02 +0000] information/ApiListener: Finished sending replay log for endpoint 'mon-02.local' in zone 'sat-01'.
[2020-06-23 13:37:02 +0000] information/ApiListener: Finished syncing endpoint 'mon-02.local' in zone 'sat-01'.
[2020-06-23 13:37:02 +0000] information/ApiListener: Finished reconnecting to endpoint 'mon-02.local' via host 'X.X.X.X' and port '5665'
[2020-06-23 13:37:02 +0000] information/ApiListener: Applying config update from endpoint 'mon-02.local' of zone 'sat-01'.
[2020-06-23 13:37:02 +0000] information/ApiListener: Received configuration for zone 'agent-01.local' from endpoint 'mon-02.local'. Comparing the timestamp and checksums.
[2020-06-23 13:37:02 +0000] information/ApiListener: Our production configuration is more recent than the received configuration update. Ignoring configuration file update for path '/var/lib/icinga2/api/zones-stage/agent-01.local'. Current timestamp '2020-06-23 13:36:44 +0000' (1592919404.360141) >= received timestamp '2020-06-23 13:36:44 +0000' (1592919404.360141).
[2020-06-23 13:37:02 +0000] information/ApiListener: Stage: Updating received configuration file '/var/lib/icinga2/api/zones-stage/agent-01.local//_etc/hosts.conf' for zone 'agent-01.local'.
[2020-06-23 13:37:02 +0000] information/ApiListener: Applying configuration file update for path '/var/lib/icinga2/api/zones-stage/agent-01.local' (362 Bytes).
[2020-06-23 13:37:02 +0000] information/ApiListener: Received configuration for zone 'global-templates' from endpoint 'mon-02.local'. Comparing the timestamp and checksums.
[2020-06-23 13:37:02 +0000] information/ApiListener: Our production configuration is more recent than the received configuration update. Ignoring configuration file update for path '/var/lib/icinga2/api/zones-stage/global-templates'. Current timestamp '2020-06-23 13:36:44 +0000' (1592919404.359671) >= received timestamp '2020-06-23 13:36:44 +0000' (1592919404.359671).
[2020-06-23 13:37:02 +0000] information/ApiListener: Stage: Updating received configuration file '/var/lib/icinga2/api/zones-stage/global-templates//_etc/commands.conf' for zone 'global-templates'.
[2020-06-23 13:37:02 +0000] information/ApiListener: Stage: Updating received configuration file '/var/lib/icinga2/api/zones-stage/global-templates//_etc/groups.conf' for zone 'global-templates'.
[2020-06-23 13:37:02 +0000] information/ApiListener: Stage: Updating received configuration file '/var/lib/icinga2/api/zones-stage/global-templates//_etc/notifications.conf' for zone 'global-templates'.
[2020-06-23 13:37:02 +0000] information/ApiListener: Stage: Updating received configuration file '/var/lib/icinga2/api/zones-stage/global-templates//_etc/services.conf' for zone 'global-templates'.
[2020-06-23 13:37:02 +0000] information/ApiListener: Stage: Updating received configuration file '/var/lib/icinga2/api/zones-stage/global-templates//_etc/templates.conf' for zone 'global-templates'.
[2020-06-23 13:37:02 +0000] information/ApiListener: Stage: Updating received configuration file '/var/lib/icinga2/api/zones-stage/global-templates//_etc/timeperiods.conf' for zone 'global-templates'.
[2020-06-23 13:37:02 +0000] information/ApiListener: Stage: Updating received configuration file '/var/lib/icinga2/api/zones-stage/global-templates//_etc/users.conf' for zone 'global-templates'.
[2020-06-23 13:37:02 +0000] information/ApiListener: Applying configuration file update for path '/var/lib/icinga2/api/zones-stage/global-templates' (11618 Bytes).
[2020-06-23 13:37:02 +0000] information/ApiListener: Received configuration updates (2) from endpoint 'mon-02.local' do not qualify for production, not triggering reload.
[2020-06-23 13:37:12 +0000] information/WorkQueue: #5 (ApiListener, RelayQueue) items: 0, rate: 0.1/s (6/min 6/5min 6/15min);
[2020-06-23 13:37:12 +0000] information/WorkQueue: #6 (ApiListener, SyncQueue) items: 0, rate: 0/s (0/min 0/5min 0/15min);

```

And that was a game changer _(at least for the `--type host` command)_.  
Now, for the first time I think, it works on the agent:  
`root@agent-01.local# icinga2 object list --type host`

```auto
Object 'agent-01.local' of type 'Host':
  % declared in '/var/lib/icinga2/api/zones/agent-01.local/_etc/hosts.conf', lines 3:1-3:47
  * __name = "agent-01.local"
  * action_url = ""
  * address = "X.X.X.X"
    % = modified in '/var/lib/icinga2/api/zones/agent-01.local/_etc/hosts.conf', lines 4:3-4:25
  * address6 = ""
  * check_command = "hostalive"
    % = modified in '/var/lib/icinga2/api/zones/agent-01.local/_etc/hosts.conf', lines 6:3-6:29
  * check_interval = 300
  * check_period = ""
  * check_timeout = null
  * command_endpoint = ""
  * display_name = "agent-01.local"
    % = modified in '/var/lib/icinga2/api/zones/agent-01.local/_etc/hosts.conf', lines 5:3-5:52
  * enable_active_checks = true
  * enable_event_handler = true
  * enable_flapping = false
  * enable_notifications = true
  * enable_passive_checks = true
  * enable_perfdata = true
  * event_command = ""
  * flapping_threshold = 0
  * flapping_threshold_high = 30
  * flapping_threshold_low = 25
  * groups = []
  * icon_image = ""
  * icon_image_alt = ""
  * max_check_attempts = 3
  * name = "agent-01.local"
  * notes = ""
  * notes_url = ""
  * package = "_cluster"
  * retry_interval = 60
  * source_location
    * first_column = 1
    * first_line = 3
    * last_column = 47
    * last_line = 3
    * path = "/var/lib/icinga2/api/zones/agent-01.local/_etc/hosts.conf"
  * templates = ["agent-01.local"]
    % = modified in '/var/lib/icinga2/api/zones/agent-01.local/_etc/hosts.conf', lines 3:1-3:47
  * type = "Host"
  * vars
    * client_endpoint = "agent-01.local"
      % = modified in '/var/lib/icinga2/api/zones/agent-01.local/_etc/hosts.conf', lines 8:3-8:29
  * volatile = false
  * zone = "agent-01.local"

```

but now I’ve got the _“PENDING/CHECK DELAYED”_ issue back in place. Moreover:

> [@blackfriar](#):
>
> By the way I’ve noticed that `Check Source` value is **mon-01.local** _(the master)_ for **any** node except for the satellite

it’s still the same.

So, to summerise, **if I tell to the satellite** that the agent nodes **have `SAT-01` as their parent zone** _(like is now set on the **master** )_ the agents finally understand who the _heck_ they really are. But then I cannot use the `zone = master` trick to check them and, **if I don’t** , they do not get checked at all and the little clock shows up again.  
If I revert this change **I’ve done on the satellite** the agents _lose consciousness_ of themselves again.  
I fix one thing and I screw up another. Damn it! : )  
And I don’t get anything from any log which may suggest that there is some malfunctioning anywhere apart from the _(somewhere previously mentioned)_ line in the master log which is probably nothing relevant but I post it anyway because I don’t have anything else to post.

```auto
2020-06-23 14:02:56 +0000] information/WorkQueue: #7 (IdoPgsqlConnection, ido-pgsql) items: 6, rate: 1.78333/s (107/min 567/5min 1508/15min); empty in infinite time, your task handler isn't able to keep up

```

---

<div class="post-metadata">

**Author:** ![blackfriar](https://community.icinga.com/letter_avatar_proxy/v4/letter/b/e99b99/32.png) [@blackfriar](https://community.icinga.com/u/blackfriar)\
**Post date:** [June 24, 2020, 11:00am UTC](https://community.icinga.com/t/stuck-with-pending-agents-with-no-endpoint-object-found-for-identity/4698/30 "2020-06-24T11:00:25Z")

</div>

I’m going through the documentation again and I found something which I need a clarification for because we discussed it before.

> [@blackfriar](#):
>
> Therefore I would expect all the related hosts.conf files to end up into the directory  
> `/etc/icinga2/zones.d/sat-01/`  
> like, for example:  
> `/etc/icinga2/zones.d/sat-01/mon-02.local.conf`  
> `/etc/icinga2/zones.d/sat-01/agent-01.local.conf`  
> `/etc/icinga2/zones.d/sat-01/agent-02.local.conf`  
> as they are all belonging to the **sat-01** zone.

> [@nhilverling](#):
>
> The agents don’t belong to the `sat-01` zone, they have their own zones which are just children of the `sat-01` zone.

In the documentation at  
[https://icinga.com/docs/icinga2/latest/doc/06-distributed-monitoring/#three-levels-with-masters-satellites-and-agents](https://icinga.com/docs/icinga2/latest/doc/06-distributed-monitoring/#three-levels-with-masters-satellites-and-agents)  
it is quite clear how it **configures the agent within the satellite zone**.  
Now, despite in the example the configuration refers to a _Top Down Command Endpoint_ model while, to my understanding, I’m trying to setup a _Top Down Config Sync_, the principle should be the same.

Where’s the mistake?

---

<div class="post-metadata">

**Author:** ![rsx](https://community.icinga.com/user_avatar/community.icinga.com/rsx/32/2094_2.png) [@rsx](https://community.icinga.com/u/rsx)\
**Post date:** [June 25, 2020, 8:51am UTC](https://community.icinga.com/t/stuck-with-pending-agents-with-no-endpoint-object-found-for-identity/4698/31 "2020-06-25T08:51:30Z")

</div>

I think its only because of wording. Each agent does have its one zone and the the host object of an agent belongs to its parent, in your case sat-01.

---

<div class="post-metadata">

**Author:** ![blackfriar](https://community.icinga.com/letter_avatar_proxy/v4/letter/b/e99b99/32.png) [@blackfriar](https://community.icinga.com/u/blackfriar)\
**Post date:** [June 25, 2020, 10:14am UTC](https://community.icinga.com/t/stuck-with-pending-agents-with-no-endpoint-object-found-for-identity/4698/32 "2020-06-25T10:14:42Z")

</div>

Thanks for replying Roland.  
I think that’s a little bit more than wording.

A copy-paste from the page:

`icinga2-master1.localdomain is the configuration master where everything is stored:`

```auto
[root@icinga2-master1.localdomain /]# mkdir -p /etc/icinga2/zones.d/{master,satellite,global-templates}

```

[root@icinga2-master1.localdomain /]# **cd** /etc/icinga2/zones.d/ **satellite**  
[root@icinga2-master1.localdomain /etc/icinga2/zones.d/ **satellite**]# **vim** icinga2- **agent** 1.localdomain.conf

```auto
object Endpoint "icinga2-agent1.localdomain" {
  host = "192.168.56.111" // The satellite actively tries to connect to the agent
  log_duration = 0 // Disable the replay log for command endpoint agents
}

object Zone "icinga2-agent1.localdomain" {
  endpoints = ["icinga2-agent1.localdomain"]

  parent = "satellite"
}

[root@icinga2-master1.localdomain /etc/icinga2/zones.d/satellite]# vim icinga2-agent2.localdomain.conf

object Endpoint "icinga2-agent2.localdomain" {
  host = "192.168.56.112" // The satellite actively tries to connect to the agent
  log_duration = 0 // Disable the replay log for command endpoint agents
}

object Zone "icinga2-agent2.localdomain" {
  endpoints = ["icinga2-agent2.localdomain"]

  parent = "satellite"
}

```

It is a **clear** instruction to edit an agent configuration  
`icinga2-agent1.localdomain.conf`  
**within** the satellite zone _(which is its actual parent zone)_  
`/etc/icinga2/zones.d/satellite`  
instead, as you and Noah confirmed, it should be  
`/etc/icinga2/zones.d/icinga2-agent1.localdomain/icinga2-agent1.localdomain.conf`

Not that I would have fixed my issue _(which I’m still working on)_ but If that information, misleading the least, wouldn’t be there I would have saved some time to myself and to you guys as well.  
I’d suggest to review that.

Thanks again for the replies.

---

<div class="post-metadata">

**Author:** ![rsx](https://community.icinga.com/user_avatar/community.icinga.com/rsx/32/2094_2.png) [@rsx](https://community.icinga.com/u/rsx)\
**Post date:** [June 25, 2020, 10:24am UTC](https://community.icinga.com/t/stuck-with-pending-agents-with-no-endpoint-object-found-for-identity/4698/33 "2020-06-25T10:24:17Z")

</div>

I’ve referred to the missunderstanding with @nhilverling. Anyway, you need to place every zone and endpoint object in zones.conf only if you’re using V2.11.

---

<div class="post-metadata">

**Author:** ![blackfriar](https://community.icinga.com/letter_avatar_proxy/v4/letter/b/e99b99/32.png) [@blackfriar](https://community.icinga.com/u/blackfriar)\
**Post date:** [June 25, 2020, 4:50pm UTC](https://community.icinga.com/t/stuck-with-pending-agents-with-no-endpoint-object-found-for-identity/4698/34 "2020-06-25T16:50:45Z")

</div>

I am using 2.11. But is there an error in the documentation?  
I need to know otherwise I’m just trying all the possible combinations and nothing is fully working and that’s really not the way to troubleshoot anyway.  
I’ve got configuration propagation but at the end checks works only if done manually, automatically don’t get triggered. So I still have the initial issue.

and this bloody error:  
`Received configuration updates (2) from endpoint 'mon-02.local' do not qualify for production, not triggering reload.`

How can I see in details those `2 updates` which the agent is discarding?  
( **already tried** : /usr/sbin/icinga2 daemon -x notice)

This is becoming too heavy to troubleshoot and the worthiness in terms of time/service is diminishing.  
If I cannot rely on the documentation I’ll have to give up and go another way.

---

<div class="post-metadata">

**Author:** ![nhilverling](https://community.icinga.com/user_avatar/community.icinga.com/nhilverling/32/4524_2.png) [@nhilverling](https://community.icinga.com/u/nhilverling)\
**Post date:** [June 29, 2020, 8:24am UTC](https://community.icinga.com/t/stuck-with-pending-agents-with-no-endpoint-object-found-for-identity/4698/35 "2020-06-29T08:24:04Z")

</div>

> [@blackfriar](#):
>
> Received configuration updates (2) from endpoint ‘mon-02.local’ do not qualify for production, not triggering reload.

That’s actually nothing bad. It just means that the config is already up to date. The message is quite confusing and will be changed with version 2.12.

> [@blackfriar](#):
>
> It is a **clear** instruction to edit an agent configuration  
> `icinga2-agent1.localdomain.conf`  
> **within** the satellite zone _(which is its actual parent zone)_  
> `/etc/icinga2/zones.d/satellite`  
> instead, as you and Noah confirmed, it should be  
> `/etc/icinga2/zones.d/icinga2-agent1.localdomain/icinga2-agent1.localdomain.conf`

Both options can be used. If you configure your agents host objects in your satellite zone, you will have to use **command\_endpoint** on services that should be executed locally on your agents. If you put those hosts in their own zones (agent1/2) you won’t need to do that.

> [@blackfriar](#):
>
> This is becoming too heavy to troubleshoot and the worthiness in terms of time/service is diminishing.  
> If I cannot rely on the documentation I’ll have to give up and go another way.

I’m not aware of any big issues with the current documentation. It might still be confusing, because the docs are trying to explain both ways of configuring a cluster (config sync / command endpoint)

If you follow [“Three Levels with Masters, Satellites and Agents”](https://icinga.com/docs/icinga2/latest/doc/06-distributed-monitoring/#three-levels-with-masters-satellites-and-agents), you should end up with a working setup. This uses command endpoint on the agents.

---

<div class="post-metadata">

**Author:** ![blackfriar](https://community.icinga.com/letter_avatar_proxy/v4/letter/b/e99b99/32.png) [@blackfriar](https://community.icinga.com/u/blackfriar)\
**Post date:** [June 29, 2020, 3:05pm UTC](https://community.icinga.com/t/stuck-with-pending-agents-with-no-endpoint-object-found-for-identity/4698/36 "2020-06-29T15:05:37Z")

</div>

> [@nhilverling](#):
>
> That’s actually nothing bad. It just means that the config is already up to date. The message is quite confusing and will be changed with version 2.12.

That’s a good news, tnx.

My configuration seems to be fully working now, the “ **check source** ” points to their **respective parents** and the config sync seems to be working very well.  
My only problem is still the very first one which still persists: checks on agents works when **triggered manually** but otherwise don’t get done automatically.

 ![Screenshot_2020-06-29_12-31-02](https://community.icinga.com/uploads/default/original/2X/f/fc65863fe0df3ec28b7aa42b90d582ad523dca02.png)  
The only services automatically checked _(without the clocks)_ are the ones of mon-01 and mon-02 **(master and satellite)** All the agents are permanently stuck.  
This is the typical detail of an agent service _(taken today 29th of June)_:  
 ![Screenshot_2020-06-29_12-34-36](https://community.icinga.com/uploads/default/original/2X/9/9cc210f9d3beeb5d39c08693b6215de0a21f51d7.png)  
Clearly shows that there is something wrong there.

**QUICK UPDATE**  
I’ve noticed that relaunching all the checks manually works _(as usual)_ but the date is still stuck on **Jun 25** which is probably when the node was moved _**(for testing)**_ into the satellite zone itself and then **took back out** on its own zone.  
 ![Screenshot_2020-06-29_17-24-00](https://community.icinga.com/uploads/default/original/2X/5/58ba7320836dd483bb43563e335a70201ab13c46.png)  
All agents are affected and, as usual, nor the master neither the satellite.

---

<div class="post-metadata">

**Author:** ![blackfriar](https://community.icinga.com/letter_avatar_proxy/v4/letter/b/e99b99/32.png) [@blackfriar](https://community.icinga.com/u/blackfriar)\
**Post date:** [July 9, 2020, 5:04pm UTC](https://community.icinga.com/t/stuck-with-pending-agents-with-no-endpoint-object-found-for-identity/4698/37 "2020-07-09T17:04:55Z")

</div>

I finally have a working deployment. Don’t know if it’s of anyone’s interest but I may re-post my current configuration when I’ll have the time (I have more nodes now).  
Anyway I think it’s important to say that one of the main issue still there which requires manual intervention resides on the puppet module which, when deploying new satellites, executes wrong/incomplete commands while proceeding with the keys/certificates initial retrieval.

(in the following puppet **doesn’t put the --host argument** for unknown reasons)

> /usr/sbin/icinga2 pki save-cert --host **mon-00.local** --port 5665 --key /var/lib/icinga2/certs/mon-03.local.key --cert /var/lib/icinga2/certs/mon-03.local.crt --trustedcert /var/lib/icinga2/certs/trusted-cert.crt

(in the following puppet **doesn’t add the --ca paramenter** and related **argument** for unknown reasons)

> /usr/sbin/icinga2 pki request --host mon-00.local --cert /var/lib/icinga2/certs/mon-03.local.crt --trustedcert /var/lib/icinga2/certs/trusted-cert.crt --key /var/lib/icinga2/certs/mon-03.local.key --ticket xxxxxxxxxxxxxxxxxxxxxxxxxx **–ca /var/lib/icinga2/certs/ca.crt**

Cheers and thanks again.

[Previous page](https://community.icinga.com/t/stuck-with-pending-agents-with-no-endpoint-object-found-for-identity/4698.md?page=1)
