Icinga / docker-icingaweb2

GNU General Public License v2.0
16 stars 11 forks source link

Deprecated option inside usage example #113

Open Donien opened 1 year ago

Donien commented 1 year ago

The usage example lists the following line

icingaweb.config.global.config_backend=db

which has been deprecated by now as far as I can tell (according to the documentation).

Result (/etc/icingaweb2/config.ini):

[global]
config_backend  = db
config_resource = icingaweb_db
...

This seems to simply be ignored in practice. However it might also be a good idea to also get rid off it here.

lersveen commented 1 month ago

I'll add to this that when icingaweb.config.global.config_backend is not set, the entrypoint skips initializing the database schema because the array of backend resources will be empty.

In our case, we connect to a MySQL server using user/pass, but have also set use_ssl to 1 and set ssl_ca to the path to the DB server root CA. This works fine for Icinga Web, but when icingaweb.config.global.config_backend is set, the entrypoint will crash with this error:

ERROR: ErrorException in /usr/share/icingaweb2/modules/setup/library/Setup/Utils/DbTool.php:323 with message: Undefined array key "ssl_key"

Shouldn't we be able to communicate with the database with SSL without using mTLS auth, or am I misunderstanding something?

The two separate issues here are that the container entrypoint requires config_backend to be set to initialize schema, but then Icinga Web setup seems to require every ssl option to be set.

What we're doing as a workaround for now is set icingaweb.config.global.config_resource, but skip icingaweb.config.global.config_backend and initialize the database schema manually.