Icinga IDO : "Outdated schema version"

Hi,

I have Icinga running on an Oracle Linux 7 (a RHEL 7 clone) root server. Automatic updates are configured with yum-cron. Lately there has been a batch of Icinga-related updates. Since then I get the following warning:

Outdated schema version: ‘1.14.3’. Latest version: ‘1.15.1’.

What exactly is the problem here? And what can I do about it?

Cheers,

Niki

Hi,

the question is if it makes sense to config automatic updates, where it’s necessary to check the upgrading docs before. e.g. Icinga. icinga updates delievers often schema updates for the DB.
Here is the link to check: Upgrading Icinga 2 - Icinga 2
Depending which version has been installed automatically you have to check the section in the docs

Have you updated via a git pull/fetch from the master branch … that’s the only way where you can get at the moment that schema version.

We also don’t advise to pull/update via the master branch as it is unstable.

The packages in packages.icinga.com still provide the schema Version 1.14.3 for the IDO.
Addition: The packaged Version of Icinga2 Core 2.13.0 + icinga2-ido-mysql provide 1.15.0 Schema

There’s an exception and those are the snapshot and giraffe packages but even those are marked as experimental and unstable.

You could update to those schemata … which reside here:

Regards

David

Hi all,
I have a fresh install of icinga2 and icingaweb2 via the icinga repository and I also get this warning:

dpkg -l | grep icinga
ii  icinga-l10n                          1.1.0-1.focal                         all          l10n (short for Localization) provides all translations available for Icinga.
ii  icinga-php-common                    1.0.0-1.focal                         all          Icinga PHP Common for Icinga Web 2
ii  icinga-php-library                   0.6.1-1.focal                         all          Icinga PHP Library for Icinga Web 2
ii  icinga-php-thirdparty                0.10.0-2.focal                        all          Icinga PHP Thirdparty for Icinga Web 2
ii  icinga2                              2.13.1-1.focal                        amd64        host and network monitoring system
ii  icinga2-bin                          2.13.1-1.focal                        amd64        host and network monitoring system - daemon
ii  icinga2-common                       2.13.1-1.focal                        all          host and network monitoring system - common files
ii  icinga2-doc                          2.13.1-1.focal                        all          host and network monitoring system - documentation
ii  icinga2-ido-mysql                    2.13.1-1.focal                        amd64        host and network monitoring system - MySQL support
ii  icingacli                            2.9.3-1.focal                         all          simple CLI tool for Icingaweb2 and its modules
ii  icingaweb2                           2.9.3-1.focal                         all          simple and responsive web interface for Icinga
ii  icingaweb2-common                    2.9.3-1.focal                         all          simple and responsive web interface for Icinga - common files
ii  icingaweb2-module-doc                2.9.3-1.focal                         all          simple and responsive web interface for Icinga - documentation module
ii  icingaweb2-module-monitoring         2.9.3-1.focal                         all          simple and responsive web interface for Icinga - monitoring module
ii  php-icinga                           2.9.3-1.focal                         all          PHP library to communicate with and use Icinga
ii  vim-icinga2                          2.13.1-1.focal                        all          syntax highlighting for Icinga 2 config files in VIM

Hi Marcus,

Can you show me which icinga repository is enabled in /etc/apt/sources.list or /etc/apt/sources.list.d/ and thanks for the dkpg output.

Regards

David

Addenum

Also could you provide the following Output ?

tail /usr/share/icinga2-ido-mysql/schema/mysql.sql 

Sure

cat /etc/apt/sources.list.d/focal-icinga.list
deb https://packages.icinga.com/ubuntu icinga-focal main
deb-src https://packages.icinga.com/ubuntu icinga-focal main
tail /usr/share/icinga2-ido-mysql/schema/mysql.sql
CREATE INDEX idx_commenthistory_remove ON icinga_commenthistory (object_id, entry_time);
CREATE INDEX idx_comments_remove ON icinga_comments (object_id, entry_time);

-- -----------------------------------------
-- set dbversion
-- -----------------------------------------
INSERT INTO icinga_dbversion (name, version, create_time, modify_time) VALUES ('idoutils', '1.15.0', NOW(), NOW())
ON DUPLICATE KEY UPDATE version='1.15.0', modify_time=NOW();

Thanks,

What is the actual Version of the used icinga ido ?

you can obtain the version with the following select.

select * from icinga_dbversion;
MariaDB [icinga2]> select * from icinga_dbversion;
+--------------+----------+---------+---------------------+---------------------+
| dbversion_id | name     | version | create_time         | modify_time         |
+--------------+----------+---------+---------------------+---------------------+
|            1 | idoutils | 1.15.0  | 2021-09-14 10:25:31 | 2021-09-14 10:25:31 |
+--------------+----------+---------+---------------------+---------------------+
1 row in set (0.000 sec)

Thanks,

Could you use the upgrade schema in

/usr/share/icinga2-ido-mysql/schema/upgrade/2.13.0.sql

to elevate it to Version 1.15.1 ?

Regards

David

Thanks a lot.
After importing the upgrade and restarting icinga2, the check is green again.

There is already a pull-request to fix this: https://github.com/Icinga/icinga2/pull/8956/files