Page 3 of 3
Re: Weird behavior after performing repair database script
Posted: Thu Mar 15, 2018 10:10 am
by Berto
The server is a VM with 10GB of memory, I've bumped it up to 16GB and retrying the repair script again.
Re: Weird behavior after performing repair database script
Posted: Thu Mar 15, 2018 12:07 pm
by scottwilkerson
Let us know if you get another Segfault
Re: Weird behavior after performing repair database script
Posted: Thu Mar 15, 2018 1:02 pm
by Berto
The script to a long time to run but after increasing the memory it completed successfully:
===============
REPAIR COMPLETE
===============
Stopping ndo2db: done.
Starting ndo2db: done.
Running configuration check...
Stopping nagios:. done.
Starting nagios: done.
=======================
nagios database repair succeeded
nagiosql database repair succeeded
nagiosxi database repair succeeded
So I ran these two request commands and here is the output for those:
echo "select max(logentry_id) from nagios_logentries;"| mysql -pnagiosxi nagios
max(logentry_id)
5432521
echo "describe nagios_logentries;"| mysql -pnagiosxi nagios
Field Type Null Key Default Extra
logentry_id int(11) NO PRI NULL auto_increment
instance_id int(11) NO MUL 0
logentry_time datetime NO MUL 0000-00-00 00:00:00
entry_time datetime NO 0000-00-00 00:00:00
entry_time_usec int(11) NO 0
logentry_type int(11) NO 0
logentry_data varchar(255) NO MUL
realtime_data smallint(6) NO 0
inferred_data_extracted smallint(6) NO 0
Re: Weird behavior after performing repair database script
Posted: Thu Mar 15, 2018 1:17 pm
by scottwilkerson
good, are you still seeing lines like this in /var/log/messages
Code: Select all
mysql_error: 'Duplicate entry '5431088' for key 'PRIMARY''
Re: Weird behavior after performing repair database script
Posted: Thu Mar 15, 2018 1:37 pm
by Berto
These are the errors I'm seeing in regards to myslql_errors
Mar 15 10:58:05 lnsvr0370 ndo2db[]: [user.info] ndo2db: mysql_error: 'MySQL server has gone away'
Mar 15 11:00:48 lnsvr0370 ndo2db[]: [user.info] ndo2db: mysql_error: 'MySQL server has gone away'
Mar 15 11:01:01 lnsvr0370 ndo2db[]: [user.info] ndo2db: mysql_error: 'MySQL server has gone away'
I also see after the script from the admin web page (screenshot attached) that there's still lots of red from the XI component status. Plus now I'm getting HTTP 500 errors when I try to navigate around Nagios web interface.
Re: Weird behavior after performing repair database script
Posted: Thu Mar 15, 2018 2:17 pm
by scottwilkerson
PM Sent
Re: Weird behavior after performing repair database script
Posted: Thu Mar 15, 2018 3:44 pm
by scottwilkerson
Assisted in Remote, there was a backlog of 60,000,000 items in xi_events from over a month ago and so many in xi_meta that mysql couldn't count them in 3 minutes....
removed these and all was working as expected