"Check now" from Icingaweb2 doesn't work


(Arethusa) #1

Hello,

I have a problem to do “check now” on Icingaweb2", maybe an error with API.

Let me show my configuration:

My Icingaweb2 server is : 192.168.1.203
My icinga2 serveir is : 192.168.1.201

Icinga2 version : r2.10.2-1
Icingaweb2 version : 2.6.2

[root@icinga2 /]# vi /etc/icinga2/conf.d/api-users.conf

/**
 * The ApiUser objects are used for authentication against the API.
 */
object ApiUser "root" {
  password = "0b6726edd80785d5"
  // client_cn = ""

  permissions = [ "*" ]
}

[root@web ~]# vi /etc/icingaweb2/modules/monitoring/commandtransports.ini

[icinga2]
transport = "api"
host = "172.18.1.123"
port = "5665"
username = "root"
password = "0b6726edd80785d5"

Feature enable:

[root@icinga2 ca]# ls -l /etc/icinga2/features-enabled
total 0
lrwxrwxrwx. 1 root root 30 30 déc.  01:59 api.conf -> ../features-available/api.conf
lrwxrwxrwx. 1 root root 34 27 déc.  03:46 checker.conf -> ../features-available/checker.conf
lrwxrwxrwx. 1 root root 34 30 déc.  01:24 command.conf -> ../features-available/command.conf
lrwxrwxrwx. 1 root root 36 27 déc.  18:12 ido-mysql.conf -> ../features-available/ido-mysql.conf
lrwxrwxrwx. 1 root root 35 27 déc.  18:21 influxdb.conf -> ../features-available/influxdb.conf
lrwxrwxrwx. 1 root root 34 27 déc.  03:46 mainlog.conf -> ../features-available/mainlog.conf
lrwxrwxrwx. 1 root root 39 27 déc.  03:46 notification.conf -> ../features-available/notification.conf

The error:

#0 /usr/share/icingaweb2/modules/monitoring/application/forms/Command/Object/CheckNowCommandForm.php(70): Icinga\Module\Monitoring\Command\Transport\CommandTransport->send(Object(Icinga\Module\Monitoring\Command\Object\ScheduleServiceCheckCommand)) #1 /usr/share/php/Icinga/Web/Form.php(1158): Icinga\Module\Monitoring\Forms\Command\Object\CheckNowCommandForm->onSuccess() #2 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Web/Controller/MonitoredObjectController.php(275): Icinga\Web\Form->handleRequest() #3 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Web/Controller/MonitoredObjectController.php(60): Icinga\Module\Monitoring\Web\Controller\MonitoredObjectController->setupQuickActionForms() #4 /usr/share/icingaweb2/modules/monitoring/application/controllers/ServiceController.php(66): Icinga\Module\Monitoring\Web\Controller\MonitoredObjectController->showAction() #5 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\Module\Monitoring\Controllers\ServiceController->showAction() #6 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch(String) #7 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response)) #8 /usr/share/php/Icinga/Application/Web.php(300): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response)) #9 /usr/share/php/Icinga/Application/webrouter.php(104): Icinga\Application\Web->dispatch() #10 /usr/share/icingaweb2/public/index.php(4): require_once(String) #11 {main}

Thank you.


(Carsten Köbke) #2

Maybe its the wrong ip of your icinga2 server? 172.18.1.123 != 192.168.1.201


(Arethusa) #3

… I’m retarded … That’s happene when you work near 5 AM.

Thank you.