Icingaweb 2 Api

Hello to All,

i have 4 Url’s for Icinaweb2. Two Url’s are working and two Url’s show’s an PHP Error.

Does anyone happen to know the right url

Icinga2 Version 2.10.4
Icinaweb2 Version 2.6.3

works: https://hostname/icingaweb2/monitoring/list/hosts?hostgroup_name={0}
works: https://hostname/icingaweb2/monitoring/list/services?servicegroup_name={0}

don’t work: https://hostname/icingaweb2/monitoring/host/show?host={0}
don’t work: https://hostname/icingaweb2/monitoring/service/show?host={0}&service={1}

Thanks to all for your help

So what is the actual error?

The URL seems to be alright, apart from the parameter.

That is the Error for " /monitoring/host/show?host={0}"

Host nicht gefunden

#0 /usr/share/php/Icinga/Exception/IcingaException.php(41): ReflectionClass->newInstanceArgs(Array)
#1 /usr/share/php/Icinga/Web/Controller.php(87): Icinga\Exception\IcingaException::create(Array)
#2 /usr/share/icingaweb2/modules/monitoring/application/controllers/HostController.php(33): Icinga\Web\Controller->httpNotFound(String)
#3 /usr/share/php/Icinga/Web/Controller/ActionController.php(152): Icinga\Module\Monitoring\Controllers\HostController->init()
#4 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(59): Icinga\Web\Controller\ActionController->__construct(Object(Icinga\Web\Request), Object(Icinga\Web\Response), Array)
#5 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#6 /usr/share/php/Icinga/Application/Web.php(300): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#7 /usr/share/php/Icinga/Application/webrouter.php(104): Icinga\Application\Web->dispatch()
#8 /usr/share/icingaweb2/public/index.php(4): require_once(String)
#9 {main}

And this is the Error for https://hostname/icingaweb2/monitoring/service/show?host={0}&service={1}

Service nicht gefunden

#0 /usr/share/php/Icinga/Exception/IcingaException.php(41): ReflectionClass->newInstanceArgs(Array)
#1 /usr/share/php/Icinga/Web/Controller.php(87): Icinga\Exception\IcingaException::create(Array)
#2 /usr/share/icingaweb2/modules/monitoring/application/controllers/ServiceController.php(38): Icinga\Web\Controller->httpNotFound(String)
#3 /usr/share/php/Icinga/Web/Controller/ActionController.php(152): Icinga\Module\Monitoring\Controllers\ServiceController->init()
#4 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(59): Icinga\Web\Controller\ActionController->__construct(Object(Icinga\Web\Request), Object(Icinga\Web\Response), Array)
#5 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#6 /usr/share/php/Icinga/Application/Web.php(300): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#7 /usr/share/php/Icinga/Application/webrouter.php(104): Icinga\Application\Web->dispatch()
#8 /usr/share/icingaweb2/public/index.php(4): require_once(String)
#9 {main}

So the host and service could not be found.

  • Wrong name?
  • Permissions / restrictions?
  • Trying to use the display_name instead of the host_name or service_name