I have 2 icinga masters running with web2 configured on both and director running on Master 1.
When i try to reschedule a check for a service on Master2 (i.e. apt service, sdc03124) from Master1 (icingaweb2 on sdc03123) i get the following error:
icinga2: Can’t send external Icinga command: 404 No objects found.
#0 /usr/share/icingaweb2/modules/monitoring/application/forms/Command/Object/CheckNowCommandForm.php(76): Icinga\Module\Monitoring\Command\Transport\CommandTransport->send(Object(Icinga\Module\Monitoring\Command\Object\ScheduleServiceCheckCommand))
#1 /usr/share/php/Icinga/Web/Form.php(1171): Icinga\Module\Monitoring\Forms\Command\Object\CheckNowCommandForm->onSuccess()
#2 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Web/Controller/MonitoredObjectController.php(325): Icinga\Web\Form->handleRequest()
#3 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Web/Controller/MonitoredObjectController.php(68): Icinga\Module\Monitoring\Web\Controller\MonitoredObjectController->setupQuickActionForms()
#4 /usr/share/icingaweb2/modules/monitoring/application/controllers/ServiceController.php(72): 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(99): Icinga\Application\Web->dispatch()
#10 /usr/share/icingaweb2/public/index.php(4): require_once(String)
#11 {main}
Also, somehow my Master2 (sdc03124) is always the default active endpoint for icinga (unless is it not running.).
Additionally, while Master 2 is active only Master 2 is shown under Hosts in Icingaweb2 (on Both Master1&2)
I don’t know if this is intendet or in which way the default endpoint is chosen.
Info:
My Setup:
Master 1 (sdc03123) zones.conf
/*
* Generated by Icinga 2 node setup commands
* on 2021-02-19 08:38:22 +0100
*/
object Endpoint "sdc03123.my.domain.com" {
}
object Endpoint "sdc03124.my.domain.com" {
host = "192.168.0.218"
}
object Zone "master" {
endpoints = [ "sdc03123.my.domain.com", "sdc03124.my.domain.com" ]
}
object Zone "global-templates" {
global = true
}
object Zone "director-global" {
global = true
}
Master2 (sdc03124) zones.conf
/*
* Generated by Icinga 2 node setup commands
* on 2021-02-19 08:50:41 +0100
*/
object Endpoint "sdc03123.my.domain.com" {
}
object Endpoint "sdc03124.my.domain.com" {
}
object Zone "master" {
endpoints = [ "sdc03123.my.domain.com", "sdc03124.my.domain.com" ]
}
/*
object Zone "sdc03124.my.domain.com" {
endpoints = [ "sdc03124.my.domain.com" ]
parent = "master"
}
* from node wizard sattelite setup
*/
object Zone "global-templates" {
global = true
}
object Zone "director-global" {
global = true
}
Master 1 (sdc0123) api-users.conf
/**
* The ApiUser objects are used for authentication against the API.
*/
object ApiUser "root" {
password = "mypassword"
// client_cn = ""
permissions = [ "*" ]
}
object ApiUser "icingaweb2" {
password = "mypassword"
permissions = [ "status/query", "actions/*", "objects/modify/*", "objects/query/*" ]
}
object ApiUser "director" {
password = "mypassword"
permissions = [ "*" ]
}
Master2 (sdc03124) api-user.conf
/**
* The ApiUser objects are used for authentication against the API.
*/
object ApiUser "root" {
password = "mypassword"
// client_cn = ""
permissions = [ "*" ]
}
object ApiUser "icingaweb2" {
password = "mypassword"
permissions = [ "status/query", "actions/*", "objects/modify/*", "objects/query/*" ]
}
object ApiUser "director" {
password = "mypassword"
permissions = [ "*" ]
}
if you require any additional info please let me know!