Hi,
I’m trying to setup Icingaweb2 with Icinga2 and the new Icingadb.
I used the following tutorials:
https://icinga.com/docs/icinga-db/latest/doc/02-Installation/ and
https://icinga.com/docs/icinga-db/latest/icinga-db-web/doc/02-Installation/#setup
However when I import the database and run through the web setup it gives me the following error:
Cannot find the IDO schema. Please verify that the given database contains the schema and that the configured user has access to it.
Validation Log
Connection to icingadb as icingadb on localhost: successful
have_ssl: DISABLED
protocol_version: 10
version: 10.3.27-MariaDB-0+deb10u1
version_compile_os: debian-linux-gnu
Which is weird, as I used this to import the database:
root@icinga:/var/log# cat /usr/share/icingadb/schema/mysql/mysql.schema.sql | mysql -uroot icingadb -p
Enter password:
root@icinga:/var/log# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 68495
Server version: 10.3.27-MariaDB-0+deb10u1 Debian 10
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> USE icingadb;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MariaDB [icingadb]> SHOW TABLES;
+-------------------------------+
| Tables_in_icingadb |
+-------------------------------+
| acknowledgement_history |
| action_url |
| checkcommand |
| checkcommand_argument |
| checkcommand_customvar |
| checkcommand_envvar |
| comment |
| comment_history |
| customvar |
| customvar_flat |
| downtime |
| downtime_history |
| endpoint |
| environment |
| eventcommand |
| eventcommand_argument |
| eventcommand_customvar |
| eventcommand_envvar |
| flapping_history |
| history |
| host |
| host_customvar |
| host_state |
| hostgroup |
| hostgroup_customvar |
| hostgroup_member |
| icingadb_instance |
| icingadb_schema |
| icon_image |
| notes_url |
| notification |
| notification_customvar |
| notification_history |
| notification_recipient |
| notification_user |
| notification_usergroup |
| notificationcommand |
| notificationcommand_argument |
| notificationcommand_customvar |
| notificationcommand_envvar |
| service |
| service_customvar |
| service_state |
| servicegroup |
| servicegroup_customvar |
| servicegroup_member |
| state_history |
| timeperiod |
| timeperiod_customvar |
| timeperiod_override_exclude |
| timeperiod_override_include |
| timeperiod_range |
| user |
| user_customvar |
| user_notification_history |
| usergroup |
| usergroup_customvar |
| usergroup_member |
| zone |
+-------------------------------+
59 rows in set (0.001 sec)
After skipping this step and completing the setup, it show a couple of MySQL/PHP errors.
In icingaweb2/monitoring/health/info
it shows:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'icingadb.icinga_dbversion' doesn't exist, query was: SELECT icinga_dbversion.version FROM icinga_dbversion
#0 /usr/share/icingaweb2/library/vendor/Zend/Db/Statement.php(297): Zend_Db_Statement_Pdo->_execute(Array)
#1 /usr/share/icingaweb2/library/vendor/Zend/Db/Adapter/Abstract.php(470): Zend_Db_Statement->execute(Array)
#2 /usr/share/icingaweb2/library/vendor/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query(String, Array)
#3 /usr/share/icingaweb2/library/vendor/Zend/Db/Adapter/Abstract.php(816): Zend_Db_Adapter_Pdo_Abstract->query(Object(Zend_Db_Select), Array)
#4 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Backend/Ido/Query/IdoQuery.php(1462): Zend_Db_Adapter_Abstract->fetchOne(Object(Zend_Db_Select))
#5 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Backend/Ido/Query/ProgramstatusQuery.php(58): Icinga\Module\Monitoring\Backend\Ido\Query\IdoQuery->getIdoVersion()
#6 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Backend/Ido/Query/IdoQuery.php(944): Icinga\Module\Monitoring\Backend\Ido\Query\ProgramstatusQuery->joinBaseTables()
#7 /usr/share/php/Icinga/Data/SimpleQuery.php(129): Icinga\Module\Monitoring\Backend\Ido\Query\IdoQuery->init()
#8 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Backend/MonitoringBackend.php(300): Icinga\Data\SimpleQuery->__construct(Object(Icinga\Data\Db\DbConnection), Array)
#9 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/DataView/DataView.php(53): Icinga\Module\Monitoring\Backend\MonitoringBackend->query(String, Array)
#10 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Backend/MonitoringBackend.php(255): Icinga\Module\Monitoring\DataView\DataView->__construct(Object(Icinga\Module\Monitoring\Backend\Ido\IdoBackend), Array)
#11 /usr/share/icingaweb2/modules/monitoring/application/controllers/HealthController.php(64): Icinga\Module\Monitoring\Backend\MonitoringBackend->from(String, Array)
#12 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\Module\Monitoring\Controllers\HealthController->infoAction()
#13 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch(String)
#14 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#15 /usr/share/php/Icinga/Application/Web.php(300): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#16 /usr/share/php/Icinga/Application/webrouter.php(99): Icinga\Application\Web->dispatch()
#17 /usr/share/icingaweb2/public/index.php(4): require_once(String)
#18 {main}
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'icingadb.icinga_dbversion' doesn't exist
#0 /usr/share/icingaweb2/library/vendor/Zend/Db/Statement/Pdo.php(219): PDOStatement->execute(Array)
#1 /usr/share/icingaweb2/library/vendor/Zend/Db/Statement.php(297): Zend_Db_Statement_Pdo->_execute(Array)
#2 /usr/share/icingaweb2/library/vendor/Zend/Db/Adapter/Abstract.php(470): Zend_Db_Statement->execute(Array)
#3 /usr/share/icingaweb2/library/vendor/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query(String, Array)
#4 /usr/share/icingaweb2/library/vendor/Zend/Db/Adapter/Abstract.php(816): Zend_Db_Adapter_Pdo_Abstract->query(Object(Zend_Db_Select), Array)
#5 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Backend/Ido/Query/IdoQuery.php(1462): Zend_Db_Adapter_Abstract->fetchOne(Object(Zend_Db_Select))
#6 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Backend/Ido/Query/ProgramstatusQuery.php(58): Icinga\Module\Monitoring\Backend\Ido\Query\IdoQuery->getIdoVersion()
#7 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Backend/Ido/Query/IdoQuery.php(944): Icinga\Module\Monitoring\Backend\Ido\Query\ProgramstatusQuery->joinBaseTables()
#8 /usr/share/php/Icinga/Data/SimpleQuery.php(129): Icinga\Module\Monitoring\Backend\Ido\Query\IdoQuery->init()
#9 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Backend/MonitoringBackend.php(300): Icinga\Data\SimpleQuery->__construct(Object(Icinga\Data\Db\DbConnection), Array)
#10 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/DataView/DataView.php(53): Icinga\Module\Monitoring\Backend\MonitoringBackend->query(String, Array)
#11 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Backend/MonitoringBackend.php(255): Icinga\Module\Monitoring\DataView\DataView->__construct(Object(Icinga\Module\Monitoring\Backend\Ido\IdoBackend), Array)
#12 /usr/share/icingaweb2/modules/monitoring/application/controllers/HealthController.php(64): Icinga\Module\Monitoring\Backend\MonitoringBackend->from(String, Array)
#13 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\Module\Monitoring\Controllers\HealthController->infoAction()
#14 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch(String)
#15 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#16 /usr/share/php/Icinga/Application/Web.php(300): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#17 /usr/share/php/Icinga/Application/webrouter.php(99): Icinga\Application\Web->dispatch()
#18 /usr/share/icingaweb2/public/index.php(4): require_once(String)
#19 {main}
I use the following versions:
root@icinga:/var/log# dpkg -l | grep icinga
ii icinga-l10n 1.0.0-1.buster all l10n (short for Localization) provides all translations available for Icinga.
ii icinga-redis 5.0.10-1.buster amd64 Persistent key-value database with network interface (metapackage)
ii icinga2 2.12.3-1.buster amd64 host and network monitoring system
ii icinga2-bin 2.12.3-1.buster amd64 host and network monitoring system - daemon
ii icinga2-common 2.12.3-1.buster all host and network monitoring system - common files
ii icinga2-doc 2.12.3-1.buster all host and network monitoring system - documentation
ii icingacli 2.8.2-1.buster all simple CLI tool for Icingaweb2 and its modules
ii icingadb 1.0.0~rc1-2.buster amd64 database connector for Icinga 2
ii icingadb-redis 1.0.0~rc1-2.buster amd64 Redis service for Icinga DB
ii icingaweb2 2.8.2-1.buster all simple and responsive web interface for Icinga
ii icingaweb2-common 2.8.2-1.buster all simple and responsive web interface for Icinga - common files
ii icingaweb2-module-doc 2.8.2-1.buster all simple and responsive web interface for Icinga - documentation module
ii icingaweb2-module-monitoring 2.8.2-1.buster all simple and responsive web interface for Icinga - monitoring module
ii php-icinga 2.8.2-1.buster all PHP library to communicate with and use Icinga
root@icinga:/var/log#
Please advice, thank you.