Array to check many interfaces

(rico.neumann) #1

Hello everybody,
I need a solution so that I can monitor the line load on a device over 100 interfaces. With an array would be best e.g. [1-120]. This spelling I know from the programming but does not work in Icinga2. Does anyone have a solution? I find some hints but nothing is praticable. According to the official help of Icinga2, each value must be entered separately. Is there another possibility?

Best Regards Rico

(1)
(2)
(3)

(Aflatto) #2

Hello

Sadly each interface has to be defined individually, although you can define an array with all the values and then write a for loop that goes over it and creates the checks from that Array .https://icinga.com/docs/icinga2/latest/doc/17-language-reference/#for-loops

(rico.neumann) #3

OK then I will try it

Thanks Rico