[icinga-users] Icinga services exec.

holo holosian at gmail.com
Wed Nov 25 20:09:26 CET 2015


I changed my zone config to look like below and now finally it is
working:
bject Endpoint "manage.domain.local" {
}
object Zone "master" {
        //this is the local node master named  = "master"
        endpoints = [ "manage.domain.local" ]
}
object Endpoint "gwhost.domain.local" {
}
object Zone "gwhost.domain.local" {
    //this is the local node = "gwhost.domain.local"
    endpoints = [ "gwhost.domain.local" ]
    parent = "master"
}
object Endpoint "freeipa01.domain.local" {
}
object Zone "freeipa01.domain.local" {
    //this is the local node = "freeipa01.domain.local"
    endpoints = [ "freeipa01.domain.local" ]
    parent = "master"
}
object Endpoint "freeipa02.domain.local" {
}
object Zone "freeipa02.domain.local" {
    //this is the local node = "freeipa02.domain.local"
    endpoints = [ "freeipa02.domain.local" ]
    parent = "master"
}
...
Thank you very much for help
//holo
On Wed, 2015-11-25 at 16:38 +0000, Michael Friedrich wrote:
> > On 25 Nov 2015, at 17:07, holo <holosian at gmail.com> wrote:
> > 
> > No sorry it is not.. i still have "Check source" as remote endpoint
> > for all services and it doesn't metter if service have
> > "command_endpoint" setted up or not. My zone  file right now
> > is  looking like that:
> > 
> > object Endpoint "manage.domain.local" {
> > }
> > 
> > object Endpoint "gwhost.domain.local" {
> > }
> > 
> > object Endpoint "freeipa01.domain.local" {
> > }
> > 
> > object Endpoint "freeipa02.domain.local" {
> > }
> > 
> > object Endpoint "domain.domain.local" {
> > }
> > 
> > object Zone "master" {
> >         //this is the local node master named  = "master"
> >         endpoints = [ "manage.domain.local", "gwhost.domain.local",
> > "freeipa01.domain.local", "freeipa02.domain.local",
> > "backup.domain.local” ]
> 
> that’s not really how zones are supposed to be working. You’ll need a
> zone and endpoint for each of your clients, having the parent zone as
> master. Then you may selectively configure the command_endpoint
> attribute on objects on your master which will then trigger a check
> execution event on the client.
> 
> Kind regards,
> Michael
> 
> > 
> > Thats really strange, why it is behaving like that. What am i doing
> > wrong?
> > 
> > //holo
> > 
> > On Wed, 2015-11-25 at 16:47 +0100, holo wrote:
> > > Thank you i see it starts working right now like i expected.
> > > 
> > > //holo
> > > 
> > > 
> > > On Wed, 2015-11-25 at 08:15 +0000, Michael Friedrich wrote:
> > > > > 
> > > > > On 25 Nov 2015, at 09:12, holo <
> > > > > holosian at gmail.com
> > > > > > wrote:
> > > > > 
> > > > > As it is my first mail to Icinga grop, first of all i wan to
> > > > > say hello to everyone.
> > > > > 
> > > > > I can't find solution to  my problem. I want to check my
> > > > > servers with Icinga2 but i have  problem with correct "place"
> > > > > of service execution. I want some services to be monitored
> > > > > from master and some on remote machine, but i can only choose
> > > > > right now between remote or local. Here is my example
> > > > > configuration:
> > > > > 
> > > > > hosts.conf
> > > > > 
> > > > > object Host "backup.domain.local" {
> > > > >   name = "backup.dictionary.local"
> > > > >   import "generic-host"
> > > > > 
> > > > >   address = "172.16.1.159"
> > > > > 
> > > > >   vars.os = "Linux"
> > > > >   vars.remote_client = “backup.domain.local"
> > > > > 
> > > > 
> > > > 
> > > > You’re specifying the custom attribute here …
> > > > 
> > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > >   /* host specific check arguments */
> > > > >   vars.users_wgreater = 10
> > > > >   vars.users_cgreater = 20
> > > > > 
> > > > >   vars.notification["mail"] = {
> > > > >     /* The UserGroup `icingaadmins` is defined in
> > > > > `users.conf`. */
> > > > >     groups = [ "icingaadmins" ]
> > > > >   }
> > > > > 
> > > > > 
> > > > > }
> > > > > 
> > > > > services.conf:
> > > > > 
> > > > > apply Service "ping4" {
> > > > >   import "generic-service"
> > > > > 
> > > > >   check_command = "ping4"
> > > > > 
> > > > >   assign where host.address
> > > > > }
> > > > > 
> > > > > apply Service "swap" {
> > > > >   import "generic-service"
> > > > > 
> > > > >   check_command = "swap"
> > > > > 
> > > > > 
> > > > >   assign where host.vars.remote_client
> > > > >   ignore where host.name == NodeName
> > > > > }
> > > > > 
> > > > > 
> > > > 
> > > > 
> > > > 
> > > > which you need to assign to the command_endpoint attribute.
> > > > 
> > > > 
> > > > Otherwise the check is still executed locally.
> > > > 
> > > > Kind regards,
> > > > Michael
> > > > 
> > > > 
> > > > 
> > > > 
> > > > > 
> > > > > And now if i will  set up zones.conf in such way:
> > > > > 
> > > > > object Endpoint "manage.domain.local" {
> > > > > }
> > > > > 
> > > > > object Endpoint "gwhost.domain.local" {
> > > > > }
> > > > > 
> > > > > object Zone "master" {
> > > > >         //this is the local node master named  = "master"
> > > > >         endpoints = [ "manage.domain.local",
> > > > > "gwhost.domain.local" ]
> > > > > 
> > > > > 
> > > > > every service is executed on my master instance which is
> > > > > manage.dictionary.local and not showing proper swap values
> > > > > (not from gwhost but from manager).  When i change Endpoint
> > > > > settings to look like that:
> > > > > 
> > > > > object Endpoint "gwhost.domain.local" {
> > > > > host = "gwhost.domain.local"
> > > > > }
> > > > > 
> > > > > every service will is executed on gwhost.domain.local and now
> > > > > swap service checking values on correct instance but in that
> > > > > case pings are going to "localhost" not via network what is
> > > > > not desirable (same for ssh service and so on). How to "tell"
> > > > > to some services that they need to be started from master and
> > > > > only some of them on client/endpoint like eg swap, disks
> > > > > check?
> > > > > 
> > > > > Regards
> > > > > Holo
> > > > > _______________________________________________
> > > > > icinga-users mailing list
> > > > > 
> > > > > icinga-users at lists.icinga.org
> > > > > https://lists.icinga.org/mailman/listinfo/icinga-users
> > > > 
> > > > 
> > > > 
> > > > -- 
> > > > Michael Friedrich, DI (FH)
> > > > Senior Developer
> > > > 
> > > > NETWAYS GmbH | Deutschherrnstr. 15-19 | D-90429 Nuernberg
> > > > Tel: +49 911 92885-0 | Fax: +49 911 92885-77
> > > > GF: Julian Hein, Bernd Erk | AG Nuernberg HRB18461
> > > > 
> > > > http://www.netways.de | Michael.Friedrich at netways.de
> > > > 
> > > > 
> > > > ** OSDC 2016 - April - netways.de/osdc **
> > > > ** OSBConf 2016 - September - osbconf.org **
> > > > _______________________________________________
> > > > icinga-users mailing list
> > > > 
> > > > icinga-users at lists.icinga.org
> > > > https://lists.icinga.org/mailman/listinfo/icinga-users
> > _______________________________________________
> > icinga-users mailing list
> > icinga-users at lists.icinga.org
> > https://lists.icinga.org/mailman/listinfo/icinga-users
> 
> 
> -- 
> Michael Friedrich, DI (FH)
> Senior Developer
> 
> NETWAYS GmbH | Deutschherrnstr. 15-19 | D-90429 Nuernberg
> Tel: +49 911 92885-0 | Fax: +49 911 92885-77
> GF: Julian Hein, Bernd Erk | AG Nuernberg HRB18461
> http://www.netways.de | Michael.Friedrich at netways.de
> 
> ** OSDC 2016 - April - netways.de/osdc **
> ** OSBConf 2016 - September - osbconf.org **
> _______________________________________________
> icinga-users mailing list
> icinga-users at lists.icinga.org
> https://lists.icinga.org/mailman/listinfo/icinga-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.icinga.org/pipermail/icinga-users/attachments/20151125/c3ee38e6/attachment-0001.html>


More information about the icinga-users mailing list