Problems with director

hi, good morning.

I have a problem with some things in director, example, when add a host there is not problem, but when i go to agent tab in the host, i have this message:
#0 /usr/share/icingaweb2/modules/director/library/Director/IcingaConfig/AgentWizard.php(109): Icinga\Module\Director\IcingaConfig\AgentWizard->getTicketSalt()
#1 /usr/share/icingaweb2/modules/director/library/Director/IcingaConfig/AgentWizard.php(141): Icinga\Module\Director\IcingaConfig\AgentWizard->getTicket()
#2 /usr/share/icingaweb2/modules/director/library/Director/Web/SelfService.php(256): Icinga\Module\Director\IcingaConfig\AgentWizard->renderWindowsInstaller()
#3 /usr/share/icingaweb2/modules/director/library/Director/Web/SelfService.php(52): Icinga\Module\Director\Web\SelfService->showLegacyAgentInstructions()
#4 /usr/share/icingaweb2/modules/director/application/controllers/HostController.php(502): Icinga\Module\Director\Web\SelfService->renderTo()
#5 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\Module\Director\Controllers\HostController->agentAction()
#6 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch()
#7 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch()
#8 /usr/share/php/Icinga/Application/Web.php(304): Zend_Controller_Front->dispatch()
#9 /usr/share/php/Icinga/Application/webrouter.php(107): Icinga\Application\Web->dispatch()
#10 /usr/share/icingaweb2/public/index.php(4): require_once(String)
#11 {main}

Can i do something?

  • Director version (System - About):
  • Icinga Web 2 version and modules (System - About):
    2.9.2
  • Icinga 2 version (icinga2 --version):
  • Operating System and version: amazon linux 2
  • Webserver, PHP versions:
    7.4.3

root@icinga2:~# icinga2 --version
icinga2 - The Icinga 2 network monitoring daemon (version: r2.13.0-1)

Copyright (c) 2012-2021 Icinga GmbH (https://icinga.com/)
License GPLv2+: GNU GPL version 2 or later https://gnu.org/licenses/gpl2.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

System information:
Platform: Ubuntu
Platform version: 20.04.2 LTS (Focal Fossa)
Kernel: Linux
Kernel version: 5.8.0-1041-aws
Architecture: x86_64

Build information:
Compiler: GNU 9.3.0
Build host: runner-hh8q3bz2-project-298-concurrent-0
OpenSSL version: OpenSSL 1.1.1f 31 Mar 2020

Application information:

General paths:
Config directory: /etc/icinga2
Data directory: /var/lib/icinga2
Log directory: /var/log/icinga2
Cache directory: /var/cache/icinga2
Spool directory: /var/spool/icinga2
Run directory: /run/icinga2

Old paths (deprecated):
Installation root: /usr
Sysconf directory: /etc
Run directory (base): /run
Local state directory: /var

Internal paths:
Package data directory: /usr/share/icinga2
State path: /var/lib/icinga2/icinga2.state
Modified attributes path: /var/lib/icinga2/modified-attributes.conf
Objects path: /var/cache/icinga2/icinga2.debug
Vars path: /var/cache/icinga2/icinga2.vars
PID path: /run/icinga2/icinga2.pid

1 Like

What Icingaweb module(s) do you have installed and what version are they?

99% of the time that I see a PHP error with director, it’s either that I didn’t install one of the supported modules (IPL, Incubator, and reactbundle), or I have a missing PHP library (listed under the same link above).

i can fix this error updating director, but now i have this messsage in agent tab:

Please check the Icinga 2 Client documentation for more related information. The Director-assisted setup corresponds to configuring a Top Down environment.

A ticket for this agent could not have been requested from your deployment endpoint: Ticket salt is not configured in ApiListener object

I dont known what to do

Well, did you check the Icinga 2 Client documentation?
Is there any more information you can give for your problem?

1 Like

If you haven’t figured it out yourself already, you can try the following.

Add this ticket_salt = TicketSalt attribute to the ApiListener object in /etc/icinga2/features-enabled/api.conf and make sure that the TicketSalt constant is being set in /etc/icinga2/constants.conf.

1 Like

Thanks! works!
You known why happend this? agent tab works, but i upgrade the system and then start the problem

Unfortunately I can’t tell you anything as I don’t know for sure how it was before. Maybe you or someone else accidentally or intentionally removed this attribute from the ApiListener object configuration!.

I don`t kwown, this started after a yum upgrade.

Regards

Possible that you yum upgraded a PHP package to the wrong version?