Page 2 of 2
Re: High CPU load on optimization of NDOUTILS Db
Posted: Wed Aug 05, 2015 2:17 pm
by toper
Hi,
Lots of errors in messages after repair
Aug 5 21:15:56 khk26dsg5 ndo2db: mysql_error: 'Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed'
Aug 5 21:15:56 khk26dsg5 ndo2db: mysql_error: 'Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed'
Aug 5 21:15:56 khk26dsg5 ndo2db: mysql_error: 'Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed'
Aug 5 21:15:56 khk26dsg5 ndo2db: mysql_error: 'Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed'
/Peter
Re: High CPU load on optimization of NDOUTILS Db
Posted: Wed Aug 05, 2015 2:32 pm
by toper
Hi,
After repair i got a lot of faults in /var/log/messages
Aug 5 21:15:55 khk26dsg5 ndo2db: mysql_error: 'Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed'
Aug 5 21:15:55 khk26dsg5 ndo2db: mysql_error: 'Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed'
Aug 5 21:15:55 khk26dsg5 ndo2db: mysql_error: 'Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed'
Aug 5 21:15:55 khk26dsg5 ndo2db: mysql_error: 'Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed'
Aug 5 21:15:55 khk26dsg5 ndo2db: mysql_error: 'Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed'
Aug 5 21:15:55 khk26dsg5 ndo2db: mysql_error: 'Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair
So i did
service nagios stop
echo 'TRUNCATE TABLE nagios_logentries;' |mysql -t -u root -pnagiosxi nagios
service mysqld stop
/usr/local/nagiosxi/scripts/repairmysql.sh nagios
Now Repair was OK
service nagios start
/Peter
Re: High CPU load on optimization of NDOUTILS Db
Posted: Wed Aug 05, 2015 2:46 pm
by tgriep
I guess the truncate took a while and the database was still receiving new data.
Let us know if this works for you.
Re: High CPU load on optimization of NDOUTILS Db
Posted: Thu Aug 06, 2015 11:11 am
by toper
Hi,
No problem since 2200 yesterday.
How do we avoid this problem coming up again ?
Are there some autocleanup running ?
Already a lot of new entries.
[root@khk26dsg5 ~]# ls -lR /var/lib/mysql/nagios/nagios_logentries*
-rw-rw---- 1 mysql mysql 8972 May 22 2014 /var/lib/mysql/nagios/nagios_logentries.frm
-rw-rw---- 1 mysql mysql 210626696 Aug 6 18:21 /var/lib/mysql/nagios/nagios_logentries.MYD
-rw-rw---- 1 mysql mysql 233720832 Aug 6 18:21 /var/lib/mysql/nagios/nagios_logentries.MYI
thanks,
Peter Calum
TDC
Denmark
Re: High CPU load on optimization of NDOUTILS Db
Posted: Thu Aug 06, 2015 12:15 pm
by tgriep
There is not an automated way of to truncate the MYSQL tables, it is a manual process, so periodically you will have to truncate the tables and run the repair to shrink the tables.
Re: High CPU load on optimization of NDOUTILS Db
Posted: Fri Aug 07, 2015 1:17 am
by toper
Hi,
I think it should be considered to make som automatic cleanup, like the other Database settings under 'Performance settings'
Thanks,
Peter Calum
Re: High CPU load on optimization of NDOUTILS Db
Posted: Fri Aug 07, 2015 9:04 am
by hsmith
toper wrote:Hi,
I think it should be considered to make som automatic cleanup, like the other Database settings under 'Performance settings'
Thanks,
Peter Calum
Hi Toper,
I can put in a feature request for you. Is this topic safe to close?
Re: High CPU load on optimization of NDOUTILS Db
Posted: Fri Aug 07, 2015 10:13 am
by toper
Hi,
Yes, we can close this ticket.
thanks,
Peter