On Saturday 21 January 2017 at 12:29:17, Mathieu Arnold wrote:

> Le 21/01/2017 à 10:25, Antony Stone a écrit :
> > On Saturday 21 January 2017 at 09:13:45, Mathieu Arnold wrote:
> >> Le 20/01/2017 à 20:16, Antony Stone a écrit :
> >>> 
> >>> Have you looked at the "command_endpoint" attribute of the Service
> >>> check?
> >> 
> >> I have seen it, but the vagueness of its description, "The endpoint
> >> where commands are executed on." did not really tell me that it is
> >> going to restrict itself to the check_command for the host.
> > 
> > If you set it in a Host definition, it defines which host the
> > check_command for that Host runs on.
> > 
> > If you set it in a Service definition, it defines which host the
> > check_command for that Service runs on.
> 
> Ok, so, I tried adding a:
> 
>         if (zone != "") { command_endpoint = "icinga.example.org" }
> 
> to my generic-host template, it burps with:
> 
> critical/config: Error: Validation failed for object 'www.example.org'
> of type 'Host'; Attribute 'command_endpoint': Command endpoint must be
> in zone 'www.example.org' or in a direct child zone thereof.

> Which is true, the endpoint I put is in the parent zone of www.example.org

Well, yes - any Host you want to perform a test on has to exist in the Zone of 
the machine doing the test - in this case, the Zone of icinga.example.org

If the Host doesn't exist in that Zone, then the machine doing the check has 
no way to know what it's supposed to be doing the check on...

I'm not sure I have any good answer to your original question.


Antony.

-- 
There's no such thing as bad weather - only the wrong clothes.

 - Billy Connolly

                                                   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

Reply via email to