Apply Rule on multidimensional Array

Hi everyone,

We are using Icinga (With icinga Director) since a few months to simplify our monitoring thanks to the web interface. Although this is easy to take charge of it, we encounter some difficulties. Indeed, we are trying to use “Apply Rules” but is it possible to create an Apply Rule who will loop on a two-dimensional array?

Our configuration:

  • Icinga Core + Web 2.9.5
  • Director 1.8.1

Let me explain, we want to monitor a port range’s (5010 → < service name 1>, 5011 → <service name 2>, 5012 → <service name 3>). We would like to loop on an array of port, but the name displayed by the monitoring must be the name of the service:

An associative array seems to be the solution:
[ (5010 => service1),
(5011 => service2),
(5012 => service3) ]
Apply for → web inject

Is there a solution like this or an equivalent that can resolve our problem?
Thank you in advance. I hope I’m clear enough to simplify your comprehension of our problem.

+1

Same as Service Apply Rules with array variable

Would be great to be able to use multidimensional array :slight_smile: in Icinga director
[
[
“value1”,
“value2”
],
[
“value1”,
“value2”
],
[
“value1”,
“value2”
]
]