Re: [icinga-users] how to assign service objects with names from an array?

2016-10-19 Thread Antony Stone
On Thursday 20 October 2016 at 00:28:21, Michael Martinez wrote: > I stumbled on the answer myself: > > servicenames = [ "1", "2" ] > for (item in servicenames) { > object Service "prefix" + item use(item) { > get_service(, item).state > } > } This, for me, begs the questions: 1. Wh

Re: [icinga-users] how to assign service objects with names from an array?

2016-10-19 Thread Michael Martinez
I stumbled on the answer myself: servicenames = [ "1", "2" ] for (item in servicenames) { object Service "prefix" + item use(item) { get_service(, item).state } } On Wed, Oct 19, 2016 at 12:17 PM, Michael Martinez wrote: > var names = [ "name1", "name2" ] > > i would like to create s

Re: [icinga-users] how to ignore a Host

2016-10-19 Thread Michael Martinez
I would like to ignore them as if they didn't exist, as if Icinga did not care to check their status. The reason is because my list of host objects is imported automatically and it's a very large list. There's a subset of hosts we don't want icinga to monitor, and it would be easier for me to tell

[icinga-users] how to assign service objects with names from an array?

2016-10-19 Thread Michael Martinez
var names = [ "name1", "name2" ] i would like to create service objects with the above names, and inside each object definition, reference the name in a get_service function call. I would like to do this in a for loop because my array of names is large. I have tried: for (name in names) do { o