Installation of IcingaWeb2 via the web cli instead of web frontend

Hello there,
I am wondering if it is possible to perform the last step of the IcingaWeb installation on the web cli instead of the web browser installation.
I am trying to fully automate the Icinga installation (icinga2, icingaweb2, postgresql, timescale, grafana) with a linux bash script.

Couldn’t find anything pointing to this in the documentation: Installation - Icinga Web 2

Hi,

what you are looking for can be found in the advanced topic. Like this one for autmation: Advanced Topics - Icinga Web 2

1 Like

Hi @stevie-sy,
thank you for this advice!
I followed the instructions. For some reason the link http://localhosth/icingaweb2/setup is still displaying the setup like shown in the first post.

The file structure of icingaweb2 is still the following although of executing the command from the instructions:


[root@mon-ma01 icingaweb2]# icingacli setup config directory --group icingaweb2
Successfully created configuration directory /etc/icingaweb2

icingaweb2/
├── modules
│ ├── setup
│ │ └── config.ini
│ └── translation
│ └── config.ini
└── setup.token

But according to your link it should be:
/etc/icingaweb2/
/etc/icingaweb2/authentication.ini
/etc/icingaweb2/modules
/etc/icingaweb2/modules/monitoring
/etc/icingaweb2/modules/monitoring/config.ini
/etc/icingaweb2/modules/monitoring/instances.ini
/etc/icingaweb2/modules/monitoring/backends.ini
/etc/icingaweb2/roles.ini
/etc/icingaweb2/config.ini
/etc/icingaweb2/enabledModules
/etc/icingaweb2/enabledModules/monitoring
/etc/icingaweb2/enabledModules/doc
/etc/icingaweb2/resources.ini

Setup is a own modul. So if this shouldn’t be active any moore. You have to disable it:
CLI command:
icingacli module enable <modulname>
or in the UI:
Configuration → Module

Yes, that is what this CLI command is doing described under point 8: creating the directory incl. files. So any problems/questions for this step?

1 Like

Hi @stevie-sy
Although of disabling the module setup, it is still available through http://…/icingaweb2/setup

Strangely trying to remove the module with this command leads to an error:

[root@ma01 ~]# icingacli module remove setup
ERROR: Icinga\Exception\IcingaException in /usr/share/php/Icinga/Cli/Command.php:143 with message: Not implemented yet

It’s
icingacli module enable/disable <modulname>
not remove!

1 Like

It was disabled also, but the setup page is still available?

hmm… than I’m out of ideas. In our installation the setup modul is disabled and the setup page is not available.

The issue was that no all required parameters have been given to the master node.

The last problem is now, that although that the module “monitoring” is activated, no back end has been assigned. Opening the web interface, you can see that only the Backend Name is missing.
Is there a way to create the back end for the monitoring module on the cli?