How to solve the icinga2 error

icinga2-bin 2.11.1-1.xenial
os ubuntu 16.04

sudo icingacli director command create check_my_xp \

--json '{ "imports":"plugin-check-command","timeout":"30","command":"/data/icinga2/scripts/check_my_xp","arguments":{ "-P":"$PORT$" } }'

ERROR: Icinga\Exception\NotFoundError in /usr/share/icingaweb2/modules/director/library/Director/Data/Db/DbObject.php:642 with message: Failed to load icinga_command “plugin-check-command”

Hi,

remove the "imports":"plugin-check-command", template import, that’s not necessary anymore for Icinga 2 commands.

Cheers,
Michael

1 Like

thank you michael
resolve