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

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
espaanbroek
Posts: 6
Joined: Tue Apr 03, 2018 1:54 am
Location: Dordrecht, The Netherlands
Contact:

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

Post 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?
kg2857
Posts: 234
Joined: Wed Apr 12, 2023 5:48 pm

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

Post by kg2857 »

Maybe try searching the internet for similar messages and see what others did.
User avatar
espaanbroek
Posts: 6
Joined: Tue Apr 03, 2018 1:54 am
Location: Dordrecht, The Netherlands
Contact:

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

Post 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...
bv406
Posts: 31
Joined: Tue Apr 11, 2023 11:45 am

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

Post by bv406 »

5.11.1 was released yesterday, maybe try 5.11.1 to see if you're experiencing the same problem.
User avatar
nixe
Posts: 18
Joined: Tue Dec 12, 2017 9:17 am

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

Post 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"
User avatar
nixe
Posts: 18
Joined: Tue Dec 12, 2017 9:17 am

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

Post 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 :)
You do not have the required permissions to view the files attached to this post.
jeepsburg
Posts: 8
Joined: Wed Nov 08, 2017 8:22 am

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

Post 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
sgardil
Posts: 124
Joined: Wed Aug 09, 2023 9:58 am

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

Post 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.
bekean23
Posts: 7
Joined: Sat Jul 01, 2023 11:39 pm

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

Post 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.
Post Reply