Hey, I'm experiencing the same issue. I posted a support request here: https://dev.icinga.org/issues/11504
Hope I got this right, first time using an email list :) /Sander -----Original Message----- From: icinga-users [mailto:[email protected]] On Behalf Of [email protected] Sent: den 7 april 2016 06:46 To: [email protected] Subject: icinga-users Digest, Vol 28, Issue 5 Send icinga-users mailing list submissions to [email protected] To subscribe or unsubscribe via the World Wide Web, visit https://lists.icinga.org/mailman/listinfo/icinga-users or, via email, send a message with subject or body 'help' to [email protected] You can reach the person managing the list at [email protected] When replying, please edit your Subject line so it is more specific than "Re: Contents of icinga-users digest..." Today's Topics: 1. director zone? (NAZSA Csaba) 2. hosted-engine answer file requirements (John Nguyen) 3. icinga2 agentless monitoring (Tejas Gadaria) 4. Tricky problem with "apply where" and arrays or dictionaries (Jeff Williams) 5. Re: Tricky problem with "apply where" and arrays or dictionaries (Gunnar Beutner) ---------------------------------------------------------------------- Message: 1 Date: Wed, 6 Apr 2016 13:44:15 +0200 From: NAZSA Csaba <[email protected]> To: "[email protected]" <[email protected]> Subject: [icinga-users] director zone? Message-ID: <[email protected]> Content-Type: text/plain; charset="utf-8" Hi! I have a cluster setup with a master and thres satellites up and ready. Latest director from git works well, picked up zones and endpoints from configuration perfectly. Now how do I assign a new to to a specific zone? I created a host template with 'Cluster Zone' = satellitezone , this deploys to to zones.d/satellitezone/host_templates.conf However actual host objects inheriting this template are not. Where do I miss the point? Thanks in advance,, Csaba ------------------------------ Message: 2 Date: Wed, 6 Apr 2016 09:05:52 -0400 From: John Nguyen <[email protected]> To: "Icinga User's Corner" <[email protected]> Subject: [icinga-users] hosted-engine answer file requirements Message-ID: <CAKUu-xRcK_xb2nBMFhjCD9b3us2e30-QX3DMQVME1nq=n0l...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" Hi guys, I'm currently running Ovirt3.5 and would like to know if there is a way to accept the install defaults in the answer file. Like the vmMACAddr entry or the nicUUID. Thanks, John -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.icinga.org/pipermail/icinga-users/attachments/20160406/2348eef 4/attachment-0001.html> ------------------------------ Message: 3 Date: Wed, 6 Apr 2016 19:26:58 +0530 From: Tejas Gadaria <[email protected]> To: "Icinga User's Corner" <[email protected]> Subject: [icinga-users] icinga2 agentless monitoring Message-ID: <CAGB-CvTb9V8d+TDjofKLUryc8h7DR+61sfRDhO5uquqBwE=b...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" Hi, I am trying to use icinga2 agent less check for linux box monitoring on via ssh. I am able to grab the remote host data, however I not sure how icinga2 is snipping all this data from remote host as we are not specifying the username & password of remote host. If anyone can explain this or provide any link, it will be appreciated. Thanks , Tejas -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.icinga.org/pipermail/icinga-users/attachments/20160406/28e133c 7/attachment-0001.html> ------------------------------ Message: 4 Date: Wed, 6 Apr 2016 13:04:36 -0400 From: Jeff Williams <[email protected]> To: [email protected] Subject: [icinga-users] Tricky problem with "apply where" and arrays or dictionaries Message-ID: <CAGN9xea7GJYX_=XXaa_nX=016rzvp8g4lmwbks+vs2bh5b2...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" I have run into something that looks to me like a bug and wanted to run it past everyone before submitting it. In defining my hosts and services, sometimes I just need to not assign a service check to a host because it's just never going to work. I started by doing this: (in my host template, defining the default) vars.ignore_ping4 = false (in my specific Host definition) vars.ignore_ping4 = true (in my ping4 Service definition) ignore where host.vars.ignore_ping4 == true This works -- if the host sets vars.ignore_ping4 to true the service does not get assigned to it. But it does not scale pleasantly if you want to be able to ignore a variety of services. So I thought "Fine, I can use an array or a dictionary to define which services I need to ignore." (in my host template, defining the default) vars.ignore_service = [] (in my specific Host definition) vars.ignore_service = ["ping4"] (in my ping4 Service definition) ignore where (this.name in host.vars.ignore_service) == true This passes the config check, but is never true (thus never ignored). I have added logging to my service so that I can see the values while going through config check and they are exactly as I expected. Has anyone else run into trouble using arrays within an "ignore where" or "apply where"? I have coded this using arrays, dictionaries and functions and cannot get any of them to not assign the service to the host. Excerpts from my definitions, "ic1.example.com" is the host I'm working on: (template) template Host "generic-host" { max_check_attempts = 3 check_interval = 1m retry_interval = 30s vars.ignore_disk = false vars.ignore_swap = false vars.ignore_ping4 = false vars.ignore_service = [] check_command = "hostalive" } (host) object Host "ic1.example.com" { import "generic-do-droplet" address = "ic1.example.com" vars.remote_host = name check_command = "ssh" vars.ignore_service = ["ping4"] vars.http_vhosts["http"] = { http_uri = "/" } } (service) apply Service "ping4" { import "generic-service" check_command = "ping4" log(host.name + "!" + this.name) log((this.name in host.vars.ignore_service) == true) assign where host.address && host.name != NodeName ignore where (this.name in host.vars.ignore_service) == true } (icinga2 daemon -C) information/config: ic1.example.com!ping4 information/config: true information/config: icm1.example.com!ping4 information/config: false (command line test output): # icinga2 object list --type Service | grep Object.*ping4 Object 'ic1.example.com!ping4' of type 'Service': Object 'icm1.example.com!ping4' of type 'Service': # -- The information contained in this message and any attachments is confidential and proprietary. It is intended only for the named recipient(s). If you received this message in error, please notify us immediately and be aware that any disclosure, copying, distribution, or use of the contents of this information is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.icinga.org/pipermail/icinga-users/attachments/20160406/5850432 a/attachment-0001.html> ------------------------------ Message: 5 Date: Thu, 7 Apr 2016 04:46:16 +0000 From: Gunnar Beutner <[email protected]> To: "[email protected]" <[email protected]> Subject: Re: [icinga-users] Tricky problem with "apply where" and arrays or dictionaries Message-ID: <[email protected]> Content-Type: text/plain; charset="utf-8" Hi Jeff, There are a few problems with your config: 1. (?) == true is redundant. The ?in? operator already returns a boolean value. 2. ?this? does usually refer to the object you?re creating (e.g. the service in your case). However, by their very nature assign/ignore rules have to behave differently: There simply is no object yet, because these rules are evaluated before the object is created. ?this? in an assign/ignore filter is actually just an empty dictionary - as opposed to a reference to the new object: Breakpoint encountered. Location: in /Users/gunnar/i2/etc/icinga2/conf.d/test.conf: 9:3-9:10 /Users/gunnar/i2/etc/icinga2/conf.d/test.conf(7): apply Service "http" { /Users/gunnar/i2/etc/icinga2/conf.d/test.conf(8): assign where { /Users/gunnar/i2/etc/icinga2/conf.d/test.conf(9): debugger ^^^^^^^^ /Users/gunnar/i2/etc/icinga2/conf.d/test.conf(10): return (this.name in host.vars.ignore_services) == true /Users/gunnar/i2/etc/icinga2/conf.d/test.conf(11): } You can inspect expressions (such as variables) by entering them at the prompt. To leave the debugger and continue the program use "$continue". <1> => this.name null <2> => this { } Try this instead: ignore where ?ping4? in host.vars.ignore_service Kind regards, Gunnar Beutner On 06/04/16 19:04, "icinga-users on behalf of Jeff Williams" <[email protected] on behalf of [email protected]> wrote: >I have run into something that looks to me like a bug and wanted to run it past everyone before submitting it. > > >In defining my hosts and services, sometimes I just need to not assign a service check to a host because it's just never going to work. I started by doing this: > > >(in my host template, defining the default) > >vars.ignore_ping4 = false > > >(in my specific Host definition) > >vars.ignore_ping4 = true > > >(in my ping4 Service definition) > >ignore where host.vars.ignore_ping4 == true > > >This works -- if the host sets vars.ignore_ping4 to true the service >does not get assigned to it. But it does not scale pleasantly if you want to be able to ignore a variety of services. So I thought "Fine, I can use an array or a dictionary to define which services I need to ignore." > > >(in my host template, defining the default) > >vars.ignore_service = [] > > >(in my specific Host definition) > >vars.ignore_service = ["ping4"] > > >(in my ping4 Service definition) > >ignore where (this.name <http://this.name> in host.vars.ignore_service) >== true > > >This passes the config check, but is never true (thus never ignored). I have added logging to my service so that I can see the values while going through config check and they are exactly as I expected. > > >Has anyone else run into trouble using arrays within an "ignore where" or "apply where"? I have coded this using arrays, dictionaries and functions and cannot get any of them to not assign the service to the host. > > >Excerpts from my definitions, "ic1.example.com <http://ic1.example.com>" is the host I'm working on: > >(template) >template Host "generic-host" { > max_check_attempts = 3 > check_interval = 1m > retry_interval = 30s > > vars.ignore_disk = false > vars.ignore_swap = false > vars.ignore_ping4 = false > > vars.ignore_service = [] > > check_command = "hostalive" >} > > >(host) >object Host "ic1.example.com <http://ic1.example.com>" { > import "generic-do-droplet" > address = "ic1.example.com <http://ic1.example.com>" > vars.remote_host = name > check_command = "ssh" > vars.ignore_service = ["ping4"] > vars.http_vhosts["http"] = { > http_uri = "/" > } >} > > >(service) >apply Service "ping4" { > import "generic-service" > check_command = "ping4" > log(host.name <http://host.name> + "!" + this.name ><http://this.name>) > log((this.name <http://this.name> in host.vars.ignore_service) == >true) > assign where host.address && host.name <http://host.name> != NodeName > ignore where (this.name <http://this.name> in >host.vars.ignore_service) == true } > > >(icinga2 daemon -C) > >information/config: ic1.example.com <http://ic1.example.com>!ping4 >information/config: true >information/config: icm1.example.com <http://icm1.example.com>!ping4 >information/config: false > >(command line test output): ># icinga2 object list --type Service | grep Object.*ping4 Object >'ic1.example.com <http://ic1.example.com>!ping4' of type 'Service': >Object 'icm1.example.com <http://icm1.example.com>!ping4' of type 'Service': ># > > > > > > > > > >The information contained in this message and any attachments is >confidential and proprietary. It is intended only for the named recipient(s). If you received this message in error, please notify us immediately and be aware that any disclosure, copying, distribution, or use of the contents of this information is strictly prohibited. > > > > --? Gunnar Beutner Senior Developer NETWAYS GmbH | Deutschherrnstr. 15-19 | D-90429 Nuernberg Tel: +49 911 92885-0 | Fax: +49 911 92885-77 CEO: Julian Hein, Bernd Erk | AG Nuernberg HRB18461 http://www.netways.de | [email protected] ** OSDC 2016 - April - netways.de/osdc ** ** OSBConf 2016 - September - osbconf.org ** ------------------------------ Subject: Digest Footer _______________________________________________ icinga-users mailing list [email protected] https://lists.icinga.org/mailman/listinfo/icinga-users ------------------------------ End of icinga-users Digest, Vol 28, Issue 5 ******************************************* _______________________________________________ icinga-users mailing list [email protected] https://lists.icinga.org/mailman/listinfo/icinga-users
