Page 2 of 2
Re: Problems after upgrade from 5.6.14 to 5.8.1
Posted: Thu Feb 11, 2021 1:03 pm
by cnanational_mark
Here's the output:
[root@mvsc1lx0128 ~]# mysql -undoutils -pn@gweb nagios <<< 'select count(*) from nagios_commenthistory union all select count(*) from nagios_commenthistory where deletion_time > from_unixtime(0);'
count(*)
2440506
2432656
[root@mvsc1lx0128 ~]#
Thanks,
Mark
Re: Problems after upgrade from 5.6.14 to 5.8.1
Posted: Fri Feb 12, 2021 12:17 pm
by dchurch
Your
nagios_commenthistory table is quite large with over 2 million entries. This is normal for a system that's been running for a while.
Unfortunately there's a bug in the database schema that causes a query to not properly utilize an index. This is in turn causing MySQL to run an inefficient query every time it needs to touch that table, which is often.
Option 0 - Update NDO
Update NDO (the database backend that Nagios uses) on the Nagios XI system by doing the following:
Grab the tarball attached to this reply, do a VM snapshot or system backup, then do the following with the tarball:
Code: Select all
tar xf ndo-master.tar.gz &&
cd ndo-master &&
./configure &&
make all &&
make install
(If this fails, please post the entire output.)
Option 1 - Clear the comment history (this may be simpler)
If you don't care about seeing old comments/having an audit trail in the comment history for stuff like flapping/downtime, you can clear the comment history table of deleted comments by running the following command:
Code: Select all
mysql -undoutils -pn@gweb nagios <<< 'delete from nagios_commenthistory where deletion_time > from_unixtime(0);'
Re: Problems after upgrade from 5.6.14 to 5.8.1
Posted: Fri Feb 12, 2021 5:13 pm
by cnanational_mark
I applied option 0 and it seems to be working. The mysql process load is minimal and I've not seen any instances where the updates stop. I'll keep an eye on it over the weekend and give an update Monday morning.
Thanks!
Mark
Re: Problems after upgrade from 5.6.14 to 5.8.1
Posted: Mon Feb 15, 2021 12:21 pm
by cnanational_mark
I watched Nagios over the weekend and saw no issues. it's back to working normally. You can close this issue.
Thanks for all the help!
Mark
Re: Problems after upgrade from 5.6.14 to 5.8.1
Posted: Mon Feb 15, 2021 12:23 pm
by benjaminsmith
Hi Mark,
Appreciate the update. That is good news.
We'll close this out, but if anything else were to come up, please go ahead and open another thread or ticket.
Best Regards,
Benjamin