I made one now with the director. I didn’t do it in the first place because I remembered that it wasn’t working with another command. But that’s another story.
The director command gives the same output.
If I am logged in to the nagios user I will get this output which is the same as viewed on the dashboard:
nagios@ism-icinga-01:~$ '/usr/bin/icingacli' 'vspheredb' 'check' 'host' '--name' 'vm.intern.somewhere.de'
PHP Fatal error: Uncaught Error: Call to a member function translate() on null in /usr/share/php/Icinga/Application/functions.php:35
Stack trace:
#0 /usr/share/php/Icinga/Application/Config.php(328): t()
#1 /usr/share/php/Icinga/Application/Config.php(397): Icinga\Application\Config::fromIni()
#2 /usr/share/php/Icinga/Application/ApplicationBootstrap.php(589): Icinga\Application\Config::app()
#3 /usr/share/php/Icinga/Application/Cli.php(42): Icinga\Application\ApplicationBootstrap->loadConfig()
#4 /usr/share/php/Icinga/Application/ApplicationBootstrap.php(416): Icinga\Application\Cli->bootstrap()
#5 /usr/bin/icingacli(7): Icinga\Application\ApplicationBootstrap::start()
#6 {main}
thrown in /usr/share/php/Icinga/Application/functions.php on line 35
Fatal error: Uncaught Error: Call to a member function translate() on null in /usr/share/php/Icinga/Application/functions.php:35
Stack trace:
#0 /usr/share/php/Icinga/Application/Config.php(328): t()
#1 /usr/share/php/Icinga/Application/Config.php(397): Icinga\Application\Config::fromIni()
#2 /usr/share/php/Icinga/Application/ApplicationBootstrap.php(589): Icinga\Application\Config::app()
#3 /usr/share/php/Icinga/Application/Cli.php(42): Icinga\Application\ApplicationBootstrap->loadConfig()
#4 /usr/share/php/Icinga/Application/ApplicationBootstrap.php(416): Icinga\Application\Cli->bootstrap()
#5 /usr/bin/icingacli(7): Icinga\Application\ApplicationBootstrap::start()
#6 {main}
thrown in /usr/share/php/Icinga/Application/functions.php on line 35