I would migrate from Nagios to Icinga2. I would try to migrate one my custom command that works in Nagios but i can't translate in Icinga. I would create one my custom "object CheckCommand" to use in some hosts.
In nagios I have this (and still work if I execute on new Icinga2 server from shell)
./check_by_ssh -H myHostName -t 15 -l myLoginUsername -C "/opt/jboss/scripts/check_file_size.sh --maxwarn 80000000 --maxcrit 150000000 /opt/jboss/domain/servers/*/log/* /opt/jboss/domain/log/*" -E
Due to multiple level of parameter (parameter of check_by_ssh and parameter of check_file_size_ssh) I can not write the right "object CheckCommand" and "object Host" or "Apply Service".
Can someone help me?
Best reagrds
Try the following, adjust as necessary. Afaik the arguments can be specified as array and will be put together.