Hi !
When trying to delete a comment I get this and the comment is not deleted.
Does anybody know how to fix it?
thank you !
icinga2: Can’t send external Icinga command: 404 No objects found.
#0 /usr/share/icingaweb2/modules/monitoring/application/forms/Command/Object/DeleteCommentCommandForm.php(100): Icinga\Module\Monitoring\Command\Transport\CommandTransport->send(Object(Icinga\Module\Monitoring\Command\Object\DeleteCommentCommand))
#1 /usr/share/php/Icinga/Web/Form.php(1171): Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm->onSuccess()
#2 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Web/Controller/MonitoredObjectController.php(74): Icinga\Web\Form->handleRequest()
#3 /usr/share/icingaweb2/modules/monitoring/application/controllers/ServiceController.php(72): Icinga\Module\Monitoring\Web\Controller\MonitoredObjectController->showAction()
#4 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\Module\Monitoring\Controllers\ServiceController->showAction()
#5 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch(String)
#6 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#7 /usr/share/php/Icinga/Application/Web.php(300): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#8 /usr/share/php/Icinga/Application/webrouter.php(99): Icinga\Application\Web->dispatch()
#9 /usr/share/icingaweb2/public/index.php(4): require_once(String)
#10 {main}
Al2Klimov
(Grandmaster)
December 2, 2020, 4:34pm
2
Hello @GenBuri !
Please share the permissions of the Icinga 2 API user used by your Icinga Web 2 command transport.
Best,
AK
Can you tell me how I can find that out?
I have never restricted anything so I figure it would be admin rights?
By the way it is a one time thing, we never have this issue.
Al2Klimov
(Grandmaster)
December 2, 2020, 4:47pm
4
$ icinga2 object list -t apiuser
Object 'root' of type 'ApiUser':
...
* permissions = [ "*" ]
...
$
@Al2Klimov yes same permissions “*”
Al2Klimov
(Grandmaster)
December 2, 2020, 4:54pm
6
(How) Did you get rid of the particular comment?
@Al2Klimov It’s still there…
Al2Klimov
(Grandmaster)
December 2, 2020, 4:57pm
8
Does it differ from others in some way?
@Al2Klimov No not at all. It contains the same info (ticket number) as always. I tried commenting the host, do a reload and then re adding it but that didn’t work. Still in the DB I guess…
Al2Klimov
(Grandmaster)
December 2, 2020, 5:02pm
10
“re adding” what exactly?
GenBuri
December 2, 2020, 5:52pm
11
@Al2Klimov The host. I thought removing the host and putting it back would fix this, kind of like a reset. It did not.
Al2Klimov
(Grandmaster)
December 3, 2020, 11:56am
12
You said the comment contains a ticket number. I assume you could find the comment by that number. Please run icinga2 daemon -C; icinga2 object list -t comment > comments.txt
, find the comment by that number in the newly created text file and share the found details.
GenBuri
December 3, 2020, 2:37pm
13
@Al2Klimov The file is empty unfortunately !
GenBuri
December 3, 2020, 3:09pm
15
@Al2Klimov Yes now it’s huge. I see the host in there but nothing about that specific comment.
Al2Klimov
(Grandmaster)
December 3, 2020, 3:27pm
16
Are there any comments at all?
GenBuri
December 3, 2020, 3:32pm
17
@Al2Klimov I do see some comments yes but not for that host. I guess that’s why I get the 404.
Al2Klimov
(Grandmaster)
December 3, 2020, 3:45pm
18
Exactly. You’ll have to delete it from the IDO database manually.
GenBuri
December 3, 2020, 3:55pm
19
That doesn’t look easy lol
Al2Klimov
(Grandmaster)
December 3, 2020, 4:09pm
20
Re-creating the database (loosing history) is also an option.