Custom sftp check not working

I picked up this nagios java bases sftp check. The java portion is installed, and works fine I can manually run the check and get a nagios formatted output, which as I understands should work with icinga2.

Example of the command

java -jar /usr/lib/nagios/libexec/check_sftp.jar -port=22 -t=10 -temp=/tmp/ -host=x.x.x.x -user=‘xxxxx’ -pwd=‘xxxxxxxxx’ -warning=1000 -critical=2000

Example of output

OK: transfer time to 10.128.0.12 is 0.34s|time=0.34s;1.0;2.0;;

The problem comes up when I try to create a custom check command
the snippit I added in the command.conf is

object CheckCommand “check_sftp” {
// import “plugin-check-command”
command = {"java -jar /usr/lib/nagios/libexec/check_sftp.jar -port=22 -t=10 -temp=/tmp/ -host=x.x.x.x-user=xxx-pwd=xxxxxxxx-warning=1000 -cri$
arguments = {}
}

When I run icinga2 daemon -C . You guessed it big error.

root@icinga-mon:/etc/icinga2/conf.d# icinga2 daemon -C
[2021-04-14 14:49:30 +0000] information/cli: Icinga application loader (version: r2.10.3-1)
[2021-04-14 14:49:30 +0000] information/cli: Loading configuration file(s).
[2021-04-14 14:49:30 +0000] critical/config: Error: Value computed is not used.
Location: in /etc/icinga2/conf.d/commands.conf: 196:14-196:167
/etc/icinga2/conf.d/commands.conf(194): object CheckCommand “check_sftp” {
/etc/icinga2/conf.d/commands.conf(195): // import “plugin-check-command”
/etc/icinga2/conf.d/commands.conf(196): command = {“java -jar /usr/lib/nagios/libexec/check_sftp.jar -port=22 -t=10 -temp=/tmp/ -host=x.x.x.x -user=xxxx-pwd=xxxxxxxxx -warning=1000 -critical=2000”}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/etc/icinga2/conf.d/commands.conf(197): arguments = {}
/etc/icinga2/conf.d/commands.conf(198): }

So can someone please point me in the right direction. I know I am doing it wrong, I am however a newby to Icinga2, and tried my best here.

Not 100% sure, but I see multiple small error which can lead to a problem.

First the command is an array not a dictionary, so replace curly brackets {} with edged ones [].
Second the complete command will be shell-escaped, so this will likely break, better to define the parts as array.
If you use only command as no flexibility is needed, do not use variables in the command or ensure all a always present.
If you do not use arguments skip the dictionary instead of an empty dictionary.

You anonymized the password only in the command and error message not the checkcommand definition!