Home > Uncategorized > Upgrading icinga-web

Upgrading icinga-web

I started assigning parents to my hosts so that I could utilize the status map. I quickly realized that there was a bug or problem with the production of the status map in 1.7.1, as only some of the nodes weren’t appearing.

I googled the problem and came across a few bugs in the bug tracker that cited upgrading to the latest trunk; which was several commits ago (before the latest version).

1) Log out of your icinga-web user session.

2) Note the current version of icinga-web, backup the current icinga-web, and DB:

cp /usr/local/icinga-web/doc/VERSION ~/icinga-web_old_version
tar zcvf ~/icinga-web_backup.tar /usr/local/icinga-web
mysqldump -uroot -p icinga_web > ~/icinga_web_backup.sql

3) Download, decompress and build newest version of icinga:

wget http://sourceforge.net/projects/icinga/files/icinga-web/1.8.0/icinga-web-1.8.0.tar.gz/download #the latest icinga-web as of November 28th, 2012, check out http://sourceforge.net/projects/icinga/files/icinga-web/ for the latest
tar zxvf icinga-web-*.tar.gz
cd icinga-web-*
./configure #you should use the same ./configure options you had used with the currently installed version by reviewing the config.log from that build; if you used my write up, then it will be no arguments
make upgrade #this will take a while for several files and directories, just be patient.

4) Upgrade the mysql DB schema:

echo older version: $(cat ~/icinga-web_old_version)
echo newer version: $(cat /usr/local/icinga-web/doc/VERSION)
ls /usr/local/icinga-web/etc/schema/updates/mysql # find the proper sql script(s) to run, you must incrementally upgrade!
# in my instance, I was at 1.7.1, and upgrading the 1.8.0
mysql -u root -p icinga_web < /usr/local/icinga-web/etc/schema/updates/mysql/mysql_v1-7-1_to_v1-7-2.sql
mysql -u root -p icinga_web < /usr/local/icinga-web/etc/schema/updates/mysql/mysql_v1-7-2_to_v1-8-0.sql

5) Restore your old agavi web app settings, flush agavi cache and restart apache:

tar -zxvf ~/icinga-web_backup.tar -C /usr/local/icinga-web/app/config/ usr/local/icinga-web/app/config/databases.xml --transform='s%.*/\([^/]\{1,\}\)$%\1%'
tar -zxvf ~/icinga-web_backup.tar -C /usr/local/icinga-web/etc/conf.d/ usr/local/icinga-web/etc/conf.d/access.xml
tar -zxvf ~/icinga-web_backup.tar -C /usr/local/icinga-web/app/modules/inGraph/config/ usr/local/icinga-web/app/modules/inGraph/config/inGraph.xml #for ingraph
tar -zxvf ~/icinga-web_backup.tar -C /usr/local/icinga-web/app/modules/EventDB/config/ usr/local/icinga-web/app/modules/EventDB/config/databases.xml #for eventdb
service httpd restart

6) Access icinga-web in a browser, and allow the app to rebuild stuff. I saw a weird thing with the width of the Hoststatus and Status columns in any cronk; I just closed the cronk and reloaded it.

Also consider upgrading icinga.

Tags: ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: