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.
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
Thanks a lot for your explanation of what is possible, @moreamazingnick !
However, as I was saying, I would have loved to associate a name with each OID, so that the name could be used as part of the service name created as a result of the “Apply for” statement.
The example shown in https://icinga.com/docs/icinga-2/latest/doc/03-monitoring-basics/#using-apply-for-rules results in the following services being defined (listing below the display name):
if01
temp
And the check status result would of course be based on the result of SNMP polling of 1.1.1.1.1 and 1.1.1.1.2, respectively.
NB: In the meantime, our SNMP device has been replaced with another device, on which the checks are much easier to implement. So this has become a non-issue for us.