Tech C**P
15 subscribers
161 photos
9 videos
59 files
304 links
مدرس و برنامه نویس پایتون و لینوکس @alirezastack
Download Telegram
How do you upgrade Icinga2 from a very old version?

The short answer is that you need to do an incremental upgrade on its database.

But how exactly?

apt-get update
apt-cache policy icinga2-ido-mysql
The candidate section displays what version is available for you system. Do the same for icingaweb2:

apt-cache policy icingaweb2
Upgrade these packages alltogether:

apt-get upgrade -o Dpkg::Options::="--force-confold" -y
Update icinga2 packages:

apt-get upgrade icinga2 icinga2-bin icinga2-common icinga2-ido-mysql libicinga2
apt-get install icinga2-bin
apt-get install icinga2
Now check icinga2 log in tail -f /var/log/icinga2/icinga2.log, you may see errors like:

[2017-12-21 12:00:22 -0600] critical/IdoPgsqlConnection: Schema version '1.14.2' does not match the required version '1.14.3' (or newer)! Please check the upgrade documentation at https://docs.icinga.com/icinga2
Here you need to upgrade MySQL schemas, go to /usr/share/icinga2-ido-mysql/schema/upgrade path and now import new schemas to Icinga2 MySQL database. As I was in version 2.6.0 I went for 2.8.0:

mysql -u icinga2 -p icinga2 < 2.8.0.sql
It will prompt for password of user icinga2, enter the password and go on.

The content of MySQL Schemas is as follows:


2.0.2.sql  2.1.0.sql  2.2.0.sql  2.3.0.sql  2.4.0.sql  2.5.0.sql  2.6.0.sql  2.8.0.sql  2.8.1.sql
NOTE: to get the password for user icinga2 open /etc/icinga2/features-enabled/ido-mysql.conf file and get the password from here.


#linux #icinga2 #monitoring #icinga2 #icingaweb #upgrade