DISK CRITICAL - /srv/postgresql/home , /srv/postgresql/product is not accessible: No such file or directory
This is because the above is taking as a single string as partition instead of 2 partitions
I am using the default check_disk
I am not sure how to pass the two partitions in an array. For whatever reason nothing works.
I have tried passing this as well [“srv/postgresql/product” , “/srv/postgresql/product”]
Please help how to pass the two partitions in array? The master is icinga2 2.8
To be honest, I am actually not using the director (don’t get me wrong: the director is great).
Hopefully, I do not write nonsense.
But from my memory and my notes, the following way should be a possibility:
Create an array with a useful name
From Commands -> External Commands:
Create a new command, based on (included) disk.
Create a service template and import the command from step 2
Add the service from step 3 to a host and add the partitions to the array from step 1.
We had the oposite problem with the exclude parameter. So instead of “–exclude_device” / “-x” we use " --ignore-eregi-path" / -I now.
So your solution could be instead of “-p” / “–path” / " --partition" to use the parameter " -r" / “–ereg-path” / “–ereg-partition”. In case of the director move the values from the variable “disk_partitions” to “disk_ereg_path”.
I think “disk_ereg_path” should be an array. Because we had also to use for our solution with “ignore-eregi-path” an array.
Interesting why the partitions won’t work. In the command line if we just mention -p /partition1 /partition2 it works. But as directer is encapsulating the expression in quote it becomes ‘-p’ ‘/partition1 /partition2’ which is making it 1 single string. Not sure what is the work around for this
So as suggested above i changed it into regex and put like below
oh interesting if it works without an array. I will try this is also how you wrote it.
Of course it would be interesting. why we need this workarround. I discussed this also with my colleague. His idea was that maybe something changed with the disk-check. Because there were updates for the monitoring-plugins days ago.
But hopefully someone brings light into the dark.