Vars.oids["if01"] = "1.1.1.1.1"

Hi,

In the documentation, the following construct (sort of a hashkey for variable “oids”) is proposed in section 3.6.8 Using Apply For Rules. How can achieve this using Director?

I have seen this: Service Apply for Example - Icinga Director
but it falls short of what I want to achieve, i.e. associate a name to each value in the array. In my check, I will need both the key and the value. Actually, the key will be the check’s name and the value will be the polled OID. Just like in the textbook example.

Thanks,

JM

object Host “router-v6” {
check_command = “hostalive”
address6 = “2001:db8:1234::42”
vars.oids[“if01”] = “1.1.1.1.1”
vars.oids[“temp”] = “1.1.1.1.2”
vars.oids[“bgp”] = “1.1.1.1.5”
}

Hi,

I am still looking for a solution on this one. Perhaps I should have included the link to the Icinga2 manual where the sample config I want to replicate using Director is documented - here it is: 3.6.8 Using Apply For Rules

Thank you in advance for your help,

JM