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 :
>>> On Friday 20 January 2017 at 18:25:40, Mathieu Arnold wrote:
>>>> Le 20/01/2017 à 10:00, Joosten, Markus a écrit :
>>>>> Also, I recommend you have a look at the "cluster" and "cluster-zone"
>>>>> commands, which check the icinga2
>>>> I have the cluster, cluster-zone, and icinga checks running, yes, but
>>>> they are not linked to the "is this host alive" check.
>>>>
>>>>> connectivity between master and satellites, I would use this as host
>>>>> alive check command instead of SSH, if you are interested in
>>>>> monitoring the availability of your satellites :-)
>>>> The SSH check was just an example. While there are many checks that it
>>>> makes sense to run on the satellite directly (like, say, is nginx
>>>> running), it makes more sense to run the network related checks (like,
>>>> port 443 is listening, it has a non expired certificate, and the vhost
>>>> https:://www.example.org works) some place else, on the master, for
>>>> example.
>>> 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.
Location: in /usr/local/etc/icinga2/zones.d/www.example.org/host.conf:
1:0-1:25
/usr/local/etc/icinga2/zones.d/www.example.org/host.conf(1): object Host
"www.example.org" {
                                                            
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/local/etc/icinga2/zones.d/si.coopacomp.fr/coopacomp.si.conf(2): 
import "noisy-host"


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


-- 
Mathieu Arnold

_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to