Monitor engine does not work after upgrade from 5.5.9 to 5.7

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
tatianagraciap
Posts: 1
Joined: Mon Apr 20, 2020 6:24 pm

Monitor engine does not work after upgrade from 5.5.9 to 5.7

Post by tatianagraciap »

Hello,

After a offline upgrade from 5.5.9 to 5.7.3 on RHEL 7 the monitor engine does not work, i tried to restart the service but the monitor engine goes red after 2 minutes.

i have already restart the nagios service. i checked the nagios log error and i get the following info.

[1600091657] NDO-3: ndo_handle_service_status(ndo-handlers.c:953): Could not reconnect to MySQL database
[1600091658] NDO-3: Unable to prepare statement for query (27): Unknown column 'check_options' in 'field list'
[1600091658] NDO-3: Unable to prepare statement for query (28): Unknown column 'check_options' in 'field list'
[1600091658] NDO-3: Error preparing statements

Can you help me please?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Monitor engine does not work after upgrade from 5.5.9 to

Post by scottwilkerson »

It seems like a portion of the database may not have updated as expected

Lets' connect to mysql (if you change dthe mysql rppt password replace nagiosxi below with that password

Code: Select all

mysql -pnagiosxi nagios
Then lets execute the following code

Code: Select all

# Add the column 'check_options' to nagios_servicestatus if it doesn't already exist
SET @exist := (SELECT COUNT(*) FROM `information_schema`.`columns` WHERE table_name = 'nagios_servicestatus' AND column_name = 'check_options');
SET @sqlstmt := if( @exist <= 0,
'ALTER TABLE `nagios_servicestatus` ADD `check_options` smallint(6) NOT NULL default ''0'' AFTER `check_type`',
'select ''INFO: Column already exists.''');
PREPARE stmt FROM @sqlstmt;
EXECUTE stmt;

# Add the column 'check_options' to nagios_hoststatus if it doesn't already exist
SET @exist := (SELECT COUNT(*) FROM `information_schema`.`columns` WHERE table_name = 'nagios_hoststatus' AND column_name = 'check_options');
SET @sqlstmt := if (@exist <= 0, 
'ALTER TABLE `nagios_hoststatus` ADD `check_options` smallint(6) NOT NULL default ''0'' AFTER `check_type`',
'SELECT ''INFO: Column already exists.''');
PREPARE stmt FROM @sqlstmt;
EXECUTE stmt;

ALTER TABLE nagios_objects MODIFY name1 VARCHAR(1023) CHARACTER SET utf8 COLLATE utf8_bin;
ALTER TABLE nagios_objects MODIFY name2 VARCHAR(1023) CHARACTER SET utf8 COLLATE utf8_bin;
After this exit mysql

Code: Select all

exit
and restart nagios

Code: Select all

systemctl restart nagios
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked