Checkcommand fails

Hello,

I’m trying to create the checkcommand check_rittal_cmc3 and I get this error message during deployment:

[2023-05-23 13:48:02 +0200] information/cli: Icinga application loader (version: r2.13.3-1)
[2023-05-23 13:48:02 +0200] information/cli: Loading configuration file(s).
[2023-05-23 13:48:02 +0200] information/ConfigItem: Committing config item(s).
[2023-05-23 13:48:02 +0200] critical/config: Error: Validation failed for object 'rittal_cmc3' of type 'CheckCommand'; Attribute 'command': Attribute 'command' must be an array if the 'arguments' attribute is set.
Location: in [stage]/zones.d/director-global/commands.conf: 2401:5-2401:49
[stage]/zones.d/director-global/commands.conf(2399):     import "hostalive4"
[stage]/zones.d/director-global/commands.conf(2400): 
[stage]/zones.d/director-global/commands.conf(2401):     command = PluginDir + "/check_rittal_cmc3.pl"
                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[stage]/zones.d/director-global/commands.conf(2402):     arguments += {
[stage]/zones.d/director-global/commands.conf(2403):         "--sensor" = {
[2023-05-23 13:48:02 +0200] critical/config: 1 error
[2023-05-23 13:48:02 +0200] critical/cli: Config validation failed. Re-run with 'icinga2 daemon -C' after fixing the config.

What is the correct syntax in Director for the command part? Thx for your help.

Your check command definition is set to yes for render as string but needs to be set to no, so it will render as array.

Thank you, that was the solution :slight_smile: