Re: [icinga-users] get_host_group and get_objects(HostGroup) not working

2016-10-29 Thread Michael Martinez
Just an update. I was able to avoid creating unnecessary service objects by using an "apply" and "assign" instead of the "object" definition. > for (i in all_clusters) { > object Service "check cluster location throttled" use(i) { > > It works, but obviously a bunch of unnecessary service chec

[icinga-users] Can I obtain the system time inside an object definition?

2016-10-29 Thread Michael Martinez
I have a Service that I need to tweak something depending on whether the check occurs during the day or night. If day, then I want a threshold variable to be X. If night, I want it to be Y. I know I can create two different Services and assign them each a different time period. But, instead of doi

Re: [icinga-users] Can I obtain the system time inside an object definition?

2016-10-29 Thread Antony Stone
On Saturday 29 October 2016 at 18:09:31, Michael Martinez wrote: > is it possible to reference the system clock inside an IF statement? See http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/monitoring- basics section 3.4.7 Antony. -- "In fact I wanted to be John Cleese and it

Re: [icinga-users] Can I obtain the system time inside an object definition?

2016-10-29 Thread Michael Martinez
Got it. Under global runtime macros, I see icinga.date, icinga.time, etc. Thanks! On Sat, Oct 29, 2016 at 9:17 AM, Antony Stone wrote: > On Saturday 29 October 2016 at 18:09:31, Michael Martinez wrote: > >> is it possible to reference the system clock inside an IF statement? > > See > http://docs