That makes sense, not sure what I was thinking. I just moved the files
and the same thing is happening.

zones.d/testclient.dom.net/hosts.conf is the new path, I restarted the
master and then removed the files in /var/lib/icinga2/api and
restarted the client, it gets the config but still no local checks.

On the master in zones.d/testclient.dom.net/hosts.conf I also have
zone="testclient.dom.net" in the object Host, ive tried with and
without that. The files do get synced to the client and are showing
the same as what's on the master.

Is there something else I am missing?

Thanks


On Thu, Feb 16, 2017 at 2:07 AM, Antony Stone
<antony.st...@icinga.open.source.it> wrote:
> On Thursday 16 Feb 2017 at 02:59, Brad Bendy wrote:
>
>> Hi,
>>
>> Ive got a new Icinga v2.6.2 install that im trying to get the "top
>> down config sync" config working on.
>
>> In the zones.conf on the master I have:
>
>> object Zone "testclient.dom.net" {
>>        endpoints = [ "testclient.dom.net" ]
>>        parent = "master"
>> }
>
> So, the master thinks the endpoint testclient.dom.net exists in the
> testclient.dom.net zone.
>
>> In the zones.conf on the client I have:
>
>> object Zone "testclient.dom.net" {
>>        endpoints = [ "testclient.dom.net" ]
>>        parent = "master"
>> }
>
> The client believes the same, and knows its parent is the master.
>
>> On the master I have created the zones.d/master/fqdn/services.conf
>> file and currently have this in it:
>
> The file is under zones.d/master and therefore does nto get sent to the
> testclient.
>
>> apply Service for (disk => config in host.vars.disks) {
>>  import "generic-service"
>>  host_name = "testclient.dom.net"
>>  check_command = "my-check_disk"
>>  vars += config
>>  vars.disk_wfree = "9%"
>>  vars.disk_cfree = "4%"
>> }
>
> And yet it's the testclient you want the check to apply to.
>
>> This all works, and the 3 disk checks show up but show as pending and
>> the "check source" shows the masters FQDN not the remote host. (It was
>> performing checks before when the zone was set to master instead of
>> testclient.dom.net)
>
> Indeed.
>
> Move zones.d/master/fqdn to zones.d/testclient.dom.net/fqdn and it should
> work.  You have to create the config files under the name of the zone which
> the machines to be checked exist in.
>
>
> Antony.
>
> --
> I bought a book about anti-gravity.  The reviews say you can't put it down.
>
>                                                    Please reply to the list;
>                                                          please *don't* CC me.
> _______________________________________________
> icinga-users mailing list
> icinga-users@lists.icinga.org
> https://lists.icinga.org/mailman/listinfo/icinga-users
_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to