Own Command - Arguments won't be used

Hi,

I’m currently trying to implement check_pve.
I created the variables (for testing purposes only the main ones yet)

and used them as arguments

And of course I set those variables in the apply rule.

But while the those variables even appear in the service - for some reason they aren’t used at arguments.

Can anyone point my error out in this?

set_if is for booleans and parameters that are valueless like -k, --insecure, if there is a value for the argument set only the value field.

don’t forget to change the field to boolean in the director datafield list.

can you do the command screenshots once more? there is not enough information to tell you what’ wrong with the command, make sure all arguments are on the screenshot

1 Like

Ahh that is indeed my error -thank you!
I removed the set_if and now it works.

Ist there a way how I can get Icinga to not include optional parameters?
do something like “set_if $pve_vm_status$ is not empty”?
Because if I don’t include a set if the optional parameters are always included, without a value. That’s why I tried the set_if.

icinga does that already if they are empty but might fail if you do something like:

service.vars.pve_vm_status = $host.vars.customvar$

1 Like