Difficulty using Director to install Agent

This forum was archived to /woltlab and is now in read-only mode. Please register a new account on our new community platform.

You can create a thread on the new site and link to an archived thread. This archive is available as knowledge base, safe and secured.

More details here.
  • Greetings all -

    We have a new Icinga master server setup, and all appears to be working correctly, tested by adding a couple of Linux servers using basic checks, then removed them to take it back to default. We then installed Director, which again appears to be working correctly, at least navigating through menus, able to create a host, etc.

    Have not ever used the Director to deploy agents (have done manually via Linux CLI in the past), so thought we've give it a try, using https://www.icinga.com/docs/di…c/24-Working-with-agents/ as the guide.

    Have been able to create the "Agent template" as listed, and then create a new server (host), importing the Agent template, then flip over to the agent tab. We get the screen as shown that has a bash file available for download. Grab that, move it to the server host to be installed. On the host, install Icinga client without any issues.

    If we run the bash file now, it complains the proper directories don't exist, which appear to be created when we would normally manually run

    1. sudo icinga2 node wizard

    However, if we run the wizard to create the folders, then the bash file still errors out during running about not being able to overwrite the keys.

    Should we be running the setup wizard first, then the bash file? Just trying to clarify proper order of steps here :-/

    Thanks in advance!

  • More troubleshooting -

    Uninstalled Icinga2 from the client, and removed the host from Icinga Director. Re-created in Dirctor so a new key was generated.

    This time, when manually running the node setup wizard on the client and using the "manual" key as provided in the Agent tab of the host (within Director), it goes through all the steps, and at the very end we get a couple of warnings.

    1. Accept config from master? [y/N]: Y
    2. Accept commands from master? [y/N]: Y
    3. information/cli: Disabling the Notification feature.
    4. critical/cli: Cannot disable features. Path '/etc/icinga2/features-enabled' does not exist.
    5. information/cli: Enabling the Apilistener feature.
    6. critical/cli: Cannot parse available features. Path '/etc/icinga2/features-available' does not exist.
    7. critical/Application: Error: Function call 'mkstemp' for file '/etc/icinga2/features-available/api.conf.XXXXXX' failed with error code 2, 'No such file or directory'
    8. Additional information is available in '/var/log/icinga2/crash/report.1502897725.369430'

    Restarted Icinga on the master to be sure, and the client is does not show up as a connected host on IcingaWeb.

    When looking at the log, the only error/warning it provides is the same as last line above

    1. Error: Function call 'mkstemp' for file '/etc/icinga2/features-available/api.conf.XXXXXX' failed with error code 2, 'No such file or directory'
  • Well, sometimes it just requires walking away and coming back later...forgot to "Deploy" within Director, and now the client is showing up in IcingaWeb.

    • Is the above error going to be an issue later on for anything?
    • I'll try doing the bash file setup again on another node...any suggestions on why it didn't work as above?
  • The above error sounds like a broken installation of the Icinga 2 package. By default for example the RPM/Deb packages will ensure to create all configuration paths.