mariadb problem.

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
exp-user1
Posts: 65
Joined: Mon Oct 21, 2019 1:56 pm

mariadb problem.

Post by exp-user1 »

Hello,

I have the following ERROR in mariadb.log file :
200124 9:39:57 [ERROR] mysqld: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed

and a huge number of these warnings thrown in the log continuously:
200124 9:39:52 [Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. INSERT... ON DUPLICATE KEY UPDATE on a table with more than one UNIQUE KEY is unsafe Statement: INSERT INTO nagios_servicestatus....


and logentries table is NULL:

[root@olexpnagiosp01 ~]# echo "SELECT table_name AS 'Table', round(((data_length + index_length) / 1024 / 1024), 2) 'Size in MB' FROM information_schema.TABLES WHERE table_schema IN ('nagios', 'nagiosql', 'nagiosxi');" | mysql -uroot -pnagiosxi --table|grep nagios_log
| nagios_logentries | NULL |

we had incident since two days cause a lot of server to be unreachable for couple of hours, i am not sure if that affected the logentries to be NULL

I am thinking of running /usr/local/nagiosxi/scripts/repair_databases.sh


could you share the best actions to do?

Thanks.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: mariadb problem.

Post by scottwilkerson »

exp-user1 wrote:I have the following ERROR in mariadb.log file :
200124 9:39:57 [ERROR] mysqld: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed
exp-user1 wrote: I am thinking of running /usr/local/nagiosxi/scripts/repair_databases.sh


could you share the best actions to do?
Yes, this is the best action to do to fix the crashed tables.

Code: Select all

/usr/local/nagiosxi/scripts/repair_databases.sh
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked