Page 1 of 2

Migration to mysql failing because table 'nagios.xi_banner_messages' doesn't exist

Posted: Wed Jun 28, 2023 10:22 am
by espaanbroek
Today we've upgraded from 5.9 to 5.11 and started the migration from postgresql to mysql as described on https://support.nagios.com/kb/article/c ... i-560.html.

After this everything seems to work, but we see the following message in the top of every screen:

SQL Error [nagiosxi] Table 'nagios.xi_banner_messages' doesn't exist

As we couldn't find any messages about this problem we turned back the migration to mysql and running on postgresql again.

What do we have to do to succesfully migrate to postgresql and get rid of the disturbing message about the deprecation?

Re: Migration to mysql failing because table 'nagios.xi_banner_messages' doesn't exist

Posted: Wed Jun 28, 2023 6:17 pm
by kg2857
Maybe try searching the internet for similar messages and see what others did.

Re: Migration to mysql failing because table 'nagios.xi_banner_messages' doesn't exist

Posted: Thu Jun 29, 2023 2:20 am
by espaanbroek
kg2857 wrote: Wed Jun 28, 2023 6:17 pm Maybe try searching the internet for similar messages and see what others did.
I already did that of coarse...

Re: Migration to mysql failing because table 'nagios.xi_banner_messages' doesn't exist

Posted: Thu Jun 29, 2023 9:53 am
by bv406
5.11.1 was released yesterday, maybe try 5.11.1 to see if you're experiencing the same problem.

Re: Migration to mysql failing because table 'nagios.xi_banner_messages' doesn't exist

Posted: Thu Jun 29, 2023 6:08 pm
by kg2857

Re: Migration to mysql failing because table 'nagios.xi_banner_messages' doesn't exist

Posted: Wed Jul 12, 2023 4:19 pm
by nixe
bv406 wrote: Thu Jun 29, 2023 9:53 am 5.11.1 was released yesterday, maybe try 5.11.1 to see if you're experiencing the same problem.
Same problem with the latest version of Nagios XI 5.11.1
"SQL Error [nagiosxi] : Table 'nagiosxiPRD.xi_banner_messages' doesn't exist"

Re: Migration to mysql failing because table 'nagios.xi_banner_messages' doesn't exist

Posted: Wed Jul 12, 2023 5:10 pm
by nixe
we solve this issue dumping the empty xi_banner_messages table from a new instalation and import the dump to create the missing table on the old instalation, now Nagios working ok again.

I'm attach the sql file with the missing table data:
to fix this issue:

1) connect to the mysql db server used by nagiosxi
mysql -uroot -p
[enter de password]

2) open nagiosxi DB
user nagiosxi;

3) import .sql
source /path/to/file/xi_banner_messages.sql ;
exit;

and check nagiosxi again :)

Re: Migration to mysql failing because table 'nagios.xi_banner_messages' doesn't exist

Posted: Tue Jul 18, 2023 11:00 am
by jeepsburg
nixe wrote: Wed Jul 12, 2023 5:10 pm we solve this issue dumping the empty xi_banner_messages table from a new instalation and import the dump to create the missing table on the old instalation, now Nagios working ok again.

I'm attach the sql file with the missing table data:
Just to add to this solution since I wasn't exactly sure of the exact .sql destination, I downloaded the xi_banner_messages.sql file to my PC, and then uploaded it to the /tmp/ directory on nagiosxi via WinSCP. I then used a command from the link in one of the previous replies to import it to the default location, which resolved my issue;

Code: Select all

cd /tmp/
&

Code: Select all

mysql -uroot -pnagiosxi -Dnagiosxi < xi_banner_messages.sql
Thank you @nixe

Re: Migration to mysql failing because table 'nagios.xi_banner_messages' doesn't exist

Posted: Wed Aug 09, 2023 11:45 am
by sgardil
To fix this issue, we can insert the tables manually. To do so

1: connect to the mysql db in a terminal
mysql -u root -p
{password for db}

2: Copy this sql query into the terminal.

Code: Select all

CREATE TABLE IF NOT EXISTS `nagiosxi`.`xi_banner_messages` (
    `msg_id` int auto_increment,
    `message` varchar(2500) NOT NULL default '',
    `time_created` datetime,
    `created_by` int NOT NULL default 0,
    `acknowledgeable` BOOLEAN default 1,
    `specify_users` BOOLEAN default 0,
    `banner_color` varchar(40) default 'banner_message_banner_info',
    `message_active` BOOLEAN default 1,
    `start_date` DATE default '0001-01-01',
    `end_date` DATE default '0001-01-01',
    `feature_active` BOOLEAN default 1,
    `schedule_message` BOOLEAN default 0,
    primary key (`msg_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;

CREATE TABLE IF NOT EXISTS `nagiosxi`.`xi_link_users_messages` (
    `id` int auto_increment,
    `msg_id` int NOT NULL,
    `user_id` int NOT NULL,
    `acknowledged` BOOLEAN default 0,
    `specified` BOOLEAN default 0,
    primary key (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
Check your nagios Xi instance and this should have fixed the issue. We will look into the issue to see why the table wasn't inserted on the conversion.

Re: Migration to mysql failing because table 'nagios.xi_banner_messages' doesn't exist

Posted: Fri Oct 06, 2023 10:22 pm
by bekean23
espaanbroek wrote: Wed Jun 28, 2023 10:22 am Today we've upgraded from 5.9 to 5.11 and started the migration from postgresql to mysql as described on https://support.nagios.com/kb/article/c ... i-560.html fnf

After this everything seems to work, but we see the following message in the top of every screen:

SQL Error [nagiosxi] Table 'nagios.xi_banner_messages' doesn't exist

As we couldn't find any messages about this problem we turned back the migration to mysql and running on postgresql again.

What do we have to do to succesfully migrate to postgresql and get rid of the disturbing message about the deprecation?
After making any changes to the database or the configuration, it's a good practice to clear any caches that Nagios XI might be using. This can help refresh the application's view of the database. You can often do this from the Nagios XI web interface or by running a command provided by the Nagios XI documentation.