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
High CPU load on optimization of NDOUTILS Db
Re: High CPU load on optimization of NDOUTILS Db
Peter Calum
Re: High CPU load on optimization of NDOUTILS Db
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
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
Peter Calum
Re: High CPU load on optimization of NDOUTILS Db
I guess the truncate took a while and the database was still receiving new data.
Let us know if this works for you.
Let us know if this works for you.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: High CPU load on optimization of NDOUTILS Db
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
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
Peter Calum
Re: High CPU load on optimization of NDOUTILS Db
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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: High CPU load on optimization of NDOUTILS Db
Hi,
I think it should be considered to make som automatic cleanup, like the other Database settings under 'Performance settings'
Thanks,
Peter Calum
I think it should be considered to make som automatic cleanup, like the other Database settings under 'Performance settings'
Thanks,
Peter Calum
Peter Calum
Re: High CPU load on optimization of NDOUTILS Db
Hi Toper,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
I can put in a feature request for you. Is this topic safe to close?
Former Nagios Employee.
me.
me.
Re: High CPU load on optimization of NDOUTILS Db
Hi,
Yes, we can close this ticket.
thanks,
Peter
Yes, we can close this ticket.
thanks,
Peter
Peter Calum