Home » Categories » Support Documents » Technical and Support Anouncements

XI 5.10.0 and newer Postgress to MySQL Conversion

The Nagios XI default database changed from PostgreSQL to MySQL, since the initial release of XI 5.  If you see a notice after upgrading XI on your server to version 5.10.0, or later, to convert your PostgreSQL database to MySQL, it means you are still on PostgreSQL (maybe due to original installation being pre - XI 5).

The following process will guide you through a successful migration of the PostgreSQL database to the MYSQL database. Please note to only run this script on your XI 5.10.x or XI 5.11.x installation. Please make sure you have upgraded to one of those versions first, before proceeding.

Make sure to back up your XI instance first, using this document: Backing up and Restoring Nagios XI

Open a root ssh session to the Nagios server and look in the

/etc/my.cnf

file or the

/etc/my.cnf.d/mysql-server.cnf

 

file (your server will have one or the other) for the following option:

max_allowed_packet=256M

 

If it is not defined, then under this section

[mysqld]

 

Add this

max_allowed_packet=256M

 

Save the change and run this command to restart the MYSQL or MariaDB database.

systemctl restart mariadb || systemctl restart mysqld

 

Change the directory:

cd /usr/local/nagiosxi/scripts/pg2mysql/

 

Run this to download the conversion script.

wget https://assets.nagios.com/downloads/support/convert_mod.zip

 

Unzip the downloaded file by running this command:

unzip convert_mod.zip

 

Then run the following command to convert the nagiosxi database from PostgreSQL to MYSQL and setup the server to point to the database in MYSQL.

In the command to perform the conversion, it uses nagiosxi as the root password for the mysql database, if it was changed on your server, use your password instead of this example.

Run this command to set the script executable.

chmod a+x convert_mod.php

 

Then run this command to perform the conversion.

./convert_mod.php localhost root nagiosxi

 

After the script has finished, you can log back in to the XI interface and make sure everything is working correctly.



Special Offer For Knowledgebase Visitors! Get a huge discount on Nagios Log Server by clicking below.

Get 60% Off Nagios Log Server!

Did you know? Nagios provides complete monitoring of: Windows, Linux, UNIX, Servers, Websites, SNMP, DHCP, DNS, Email, Storage, Files, Apache, IIS, EC2, and more!

0 (0)
Article Rating (No Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
  • Icon Bookmark Bookmark Article (CTRL-D)
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
/usr/local/nagiosxi/var/xi-itype: No such file or directory error
Viewed 486 times since Thu, Nov 14, 2024
Nagios Software / Operating System (OS) compatibility matrix
Viewed 9376 times since Tue, Nov 12, 2024
404 errors after upgrade from 2024R1.1.2 to 2024R1.1.3
Viewed 481 times since Thu, Nov 14, 2024
Upgrade error with XI and non-standard Broker Modules
Viewed 630 times since Thu, Nov 14, 2024
Error: Invalid max_check_attempts value for host
Viewed 720 times since Thu, Nov 14, 2024
Overcoming lack of VMware SDK with VMware Wizard
Viewed 5640 times since Wed, Nov 13, 2024
CentOS/RHEL 7 End of Life
Viewed 880 times since Fri, Dec 27, 2024