How to set multiple values in one variable

Hello Colleagues,

I have a little problem with correct spelling (listing) multiple values in one variable

for example:
for the command “disk-windows” I want to enumerate the disks exceptions.
D: and F:

for this variable $disk_win_exclude$ I enter the values of the exceptions, separating them with a comma


as a result, i have the check for all disks on the server, including exceptions

inspect output

last_check_result: {
active: true,
check_source: “fs01”,
command: [
“C:\Program Files\ICINGA2\/sbin/check_disk.exe”,
execution_end: 1516399393.095000,
execution_start: 1516399393.048000,
exit_status: 0,
output: "DISK OK - free space:C:\ 46702 MB (77%); D:\ 120984 MB (9%); E:\ 4214 MB (41%); F:\ 20144 MB (2%); ",
performance_data: [

if i use single value - result OK

i use
icingaweb - 2.5.0
director - master
icinga2 - 2.8.1


I don’t use this check but I can try to help you.

Try to execute that manually please:
C:\Program Files\ICINGA2/sbin/check_disk.exe -u “mb” -x “D:” -x “F:”

If it works, you have to change the data type of the variable $disk_win_exclude$ to “array”. Because the “repeat_key” option is enabled by default on the Command, icinga will repeat the parameter -x of each element inside this variable.

Hope it will help you.

1 Like

Kevin thanks for the reply, it’s a great idea and it works !)