I attempt to setup icinga first time and frankly am a bit confused about all the databases (3?) that need to be setup. I did not find anything about the databases and database requirements in the documentation and altough know sql databases inside out this message is not very informative:
The database you’ve configured to use for Icinga Web seems to be the one of Icinga 2 / Icinga DB. Please be aware that this database configuration is supposed to be used for Icinga Web’s configuration and that it is highly recommended to not mix different schemas in the same database. If this is intentional, you can skip the validation and ignore this warning. If not, please provide a different database.
Are there more than one database required? Should I set these up myself? Is this documented someplace?
you should create databases for each components you use.
this message means that you didn’t.
You are trying to use the same database for the icingaweb2 installation as for another component (icinga2, icingadb)
You can have an Icinga2 without icingadb but this is deprecated
You can have an Icinga2 without IcingaWeb2
You can have an IcingaWeb2 without Icinga2
It works, i don’t say it always makes sense.
but the most important thing is:
If there is any database to fill out, you should create one like it says in the docs. somethimes there are encoding requirements.
CREATE DATABASE icingaweb2;
CREATE USER 'icingaweb2'@'localhost' IDENTIFIED BY 'XWzHVZcidiR#&jn4qcR9ZMVQa5Jo9';
GRANT ALL PRIVILEGES ON icingaweb2.* TO 'icingaweb2'@'localhost';
CREATE DATABASE director CHARACTER SET 'utf8';
CREATE USER director@localhost IDENTIFIED BY '3S&Vyz2Vv@Zaog7Jdanc@MMPuh~9z';
GRANT ALL ON director.* TO director@localhost;
CREATE DATABASE icingadb;
CREATE USER 'icingadb'@'localhost' IDENTIFIED BY 'owUtV&3LCiHPc&7Au4FUNJQoPd~Uq';
GRANT ALL ON icingadb.* TO 'icingadb'@'localhost';
EXIT;
But setup did not like these and claims:
It seems that either the database you defined earlier does not yet exist and cannot be created using the provided access credentials, the database does not have the required schema to be operated by Icinga Web 2 or the provided access credentials do not have the sufficient permissions to access the database. Please provide appropriate access credentials to solve this.
I copied and paste the credentials. Is setup attempting to connect username with or without hostname
There are too many not documented and not explained steps.
My first impression of icinga2 is less than rosy.
General configuration has been successfully written to: /etc/icingaweb2/config.ini
Authentication configuration has been successfully written to: /etc/icingaweb2/authentication.ini
Account "johannes" has been successfully defined as initial administrator.
User Group Backend configuration has been successfully written to: /etc/icingaweb2/groups.ini
Unable to create user group "Administrators". An error occured:
ERROR: Zend_Db_Statement_Exception in /usr/share/icinga-php/ipl/vendor/icinga/zf1/library/Zend/Db/Statement/Pdo.php:235 with message: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'icingadb.icingaweb_group' doesn't exist, query was: SELECT COUNT(*) AS cnt FROM icingaweb_group AS g WHERE (g.name = 'Administrators')
Resource configuration has been successfully written to: /etc/icingaweb2/resources.ini
Resource configuration update successful: /etc/icingaweb2/resources.ini
Module configuration update successful: /etc/icingaweb2/modules/icingab/config.ini
Commandtransport configuration update successful: /etc/icingaweb2/modules/icingadb/commandtransports.ini
Monitoring backend configuration has been successfully written to: /etc/icingaweb2/modules/monitoring/backends.ini
Resource configuration has been successfully updated: /etc/icingaweb2/resources.ini
Command transport configuration has been successfully created: /etc/icingaweb2/modules/monitoring/commandtransports.ini
Monitoring security configuration has been successfully created: /etc/icingaweb2/modules/monitoring/config.ini
Module "doc" has been successfully enabled.
Module "icingadb" has been successfully enabled.
Module "migrate" has been successfully enabled.
Module "monitoring" has been successfully enabled.