Inquiry About nagiosxi DB error(Mysql)
Posted: Tue May 08, 2018 8:50 pm
Dear Customer Service,
My name is Kazuya Nakahara and I am a infra engineer at Bizreach.
We use NagiosXi as a monitoring system.
There was a problem.
The other day, our company nagiosxi suddenly shut down.
After that, I output an error that caused the table to be damaged although it was started.
-----------------------------------------------------------------------------
myisamchk /var/lib/mysql/nagios/*.MYI
Checking MyISAM file: /var/lib/mysql/nagios/nagios_hoststatus.MYI
Data records: 545 Deleted blocks: 23
myisamchk: warning: Table is marked as crashed
myisamchk: warning: 1 client is using or hasn't closed the table properly
- check file-size
- check record delete-chain
myisamchk: error: Record at pos: 177956 is not remove-marked
myisamchk: error: record delete-link-chain corrupted
- check key delete-chain
- check index reference
- check data record references index: 1
myisamchk: error: Found 544 keys of 545
- check record links
myisamchk: error: Wrong bytesec: 0-0-0 at linkstart: 178084
MyISAM-table '/var/lib/mysql/nagios/nagios_hoststatus.MYI' is corrupted
Fix it using switch "-r" or "-o"
---------
---------
Checking MyISAM file: /var/lib/mysql/nagios/nagios_servicestatus.MYI
Data records: 6745 Deleted blocks: 44
myisamchk: warning: Table is marked as crashed
myisamchk: warning: 1 client is using or hasn't closed the table properly
- check file-size
myisamchk: warning: Size of datafile is: 2215572 Should be: 2209888
- check record delete-chain
myisamchk: error: Record at pos: 0 is not remove-marked
myisamchk: error: record delete-link-chain corrupted
- check key delete-chain
- check index reference
- check data record references index: 1
myisamchk: error: Found 6744 keys of 6745
- check record links
myisamchk: error: Wrong bytesec: 0-0-0 at linkstart: 2207552
MyISAM-table '/var/lib/mysql/nagios/nagios_servicestatus.MYI' is corrupted
Fix it using switch "-r" or "-o"
---------
-----------------------------------------------------------------------------
On this day, I restored it by running [repairmysql.sh]
Today, when we restarted to implement DB maintenance, we output the following error.
When looking at mysqld.log, there were multiple errors.
For that reason, I executed repairmysql.sh the same as the other day.
After that, I accessed it with the GUI but it did not work well, and as I looked at the system log, it seemed that many tables were damaged.
Commands:
mysqlcheck --auto-repair -c -o sample -u <user> -p
(Excerpt)
myisamchk: error: ‘/var/lib/mysql/nagios/nagios_conninfo.MYI’ is not a MyISAM-table
myisamchk: error: ‘/var/lib/mysql/nagios/nagios_customvariablestatus.MYI’ is not a MyISAM-table
myisamchk: error: ‘/var/lib/mysql/nagios/nagios_eventhandlers.MYI’ is not a MyISAM-table
myisamchk: error: ‘/var/lib/mysql/nagios/nagios_hosts.MYI’ is not a MyISAM-table
myisamchk: error: ‘/var/lib/mysql/nagios/nagios_hoststatus.MYI’ is not a MyISAM-table
myisamchk: error: ‘/var/lib/mysql/nagios/nagios_instances.MYI’ is not a MyISAM-table
myisamchk: error: ‘/var/lib/mysql/nagios/nagios_logentries.MYI’ is not a MyISAM-table
myisamchk: error: ‘/var/lib/mysql/nagios/nagios_programstatus.MYI’ is not a MyISAM-table
myisamchk: error: ‘/var/lib/mysql/nagios/nagios_servicestatus.MYI’ is not a MyISAM-table
myisamchk: error: ‘/var/lib/mysql/nagios/nagios_statehistory.MYI’ is not a MyISAM-table
myisamchk: error: ‘/var/lib/mysql/nagios/nagios_systemcommands.MYI’ is not a MyISAM-table
The other tables were normal.
Commands:
mysqlcheck --auto-repair -c -o nagios -u <user> -p
-----------------------------------------------------------------------------
(Excerpt)
Repairing tables
nagios.nagios_conninfo
Error : Incorrect file format 'nagios_conninfo'
error : Corrupt
nagios.nagios_customvariablestatus
Error : Incorrect file format 'nagios_customvariablestatus'
error : Corrupt
nagios.nagios_eventhandlers
Error : Incorrect file format 'nagios_eventhandlers'
error : Corrupt
nagios.nagios_hosts
Error : Incorrect file format 'nagios_hosts'
error : Corrupt
nagios.nagios_hoststatus
Error : Incorrect file format 'nagios_hoststatus'
error : Corrupt
nagios.nagios_instances
Error : Incorrect file format 'nagios_instances'
error : Corrupt
nagios.nagios_logentries
Error : Incorrect file format 'nagios_logentries'
error : Corrupt
nagios.nagios_programstatus
Error : Incorrect file format 'nagios_programstatus'
error : Corrupt
nagios.nagios_servicestatus
Error : Incorrect file format 'nagios_servicestatus'
error : Corrupt
nagios.nagios_statehistory
Error : Incorrect file format 'nagios_statehistory'
error : Corrupt
nagios.nagios_systemcommands
Error : Incorrect file format 'nagios_systemcommands'
error : Corrupt
-----------------------------------------------------------------------------
I confirmed the forum, but it was necessary to execute the following command on table, but are there other possible causes?
Commands:
repair table <some_table> USE_FRM;
Is there another way to respond?
We will provide you with the necessary information.
Sincerely,
Kazuya Nakahara
My name is Kazuya Nakahara and I am a infra engineer at Bizreach.
We use NagiosXi as a monitoring system.
There was a problem.
The other day, our company nagiosxi suddenly shut down.
After that, I output an error that caused the table to be damaged although it was started.
-----------------------------------------------------------------------------
myisamchk /var/lib/mysql/nagios/*.MYI
Checking MyISAM file: /var/lib/mysql/nagios/nagios_hoststatus.MYI
Data records: 545 Deleted blocks: 23
myisamchk: warning: Table is marked as crashed
myisamchk: warning: 1 client is using or hasn't closed the table properly
- check file-size
- check record delete-chain
myisamchk: error: Record at pos: 177956 is not remove-marked
myisamchk: error: record delete-link-chain corrupted
- check key delete-chain
- check index reference
- check data record references index: 1
myisamchk: error: Found 544 keys of 545
- check record links
myisamchk: error: Wrong bytesec: 0-0-0 at linkstart: 178084
MyISAM-table '/var/lib/mysql/nagios/nagios_hoststatus.MYI' is corrupted
Fix it using switch "-r" or "-o"
---------
---------
Checking MyISAM file: /var/lib/mysql/nagios/nagios_servicestatus.MYI
Data records: 6745 Deleted blocks: 44
myisamchk: warning: Table is marked as crashed
myisamchk: warning: 1 client is using or hasn't closed the table properly
- check file-size
myisamchk: warning: Size of datafile is: 2215572 Should be: 2209888
- check record delete-chain
myisamchk: error: Record at pos: 0 is not remove-marked
myisamchk: error: record delete-link-chain corrupted
- check key delete-chain
- check index reference
- check data record references index: 1
myisamchk: error: Found 6744 keys of 6745
- check record links
myisamchk: error: Wrong bytesec: 0-0-0 at linkstart: 2207552
MyISAM-table '/var/lib/mysql/nagios/nagios_servicestatus.MYI' is corrupted
Fix it using switch "-r" or "-o"
---------
-----------------------------------------------------------------------------
On this day, I restored it by running [repairmysql.sh]
Today, when we restarted to implement DB maintenance, we output the following error.
When looking at mysqld.log, there were multiple errors.
For that reason, I executed repairmysql.sh the same as the other day.
After that, I accessed it with the GUI but it did not work well, and as I looked at the system log, it seemed that many tables were damaged.
Commands:
mysqlcheck --auto-repair -c -o sample -u <user> -p
(Excerpt)
myisamchk: error: ‘/var/lib/mysql/nagios/nagios_conninfo.MYI’ is not a MyISAM-table
myisamchk: error: ‘/var/lib/mysql/nagios/nagios_customvariablestatus.MYI’ is not a MyISAM-table
myisamchk: error: ‘/var/lib/mysql/nagios/nagios_eventhandlers.MYI’ is not a MyISAM-table
myisamchk: error: ‘/var/lib/mysql/nagios/nagios_hosts.MYI’ is not a MyISAM-table
myisamchk: error: ‘/var/lib/mysql/nagios/nagios_hoststatus.MYI’ is not a MyISAM-table
myisamchk: error: ‘/var/lib/mysql/nagios/nagios_instances.MYI’ is not a MyISAM-table
myisamchk: error: ‘/var/lib/mysql/nagios/nagios_logentries.MYI’ is not a MyISAM-table
myisamchk: error: ‘/var/lib/mysql/nagios/nagios_programstatus.MYI’ is not a MyISAM-table
myisamchk: error: ‘/var/lib/mysql/nagios/nagios_servicestatus.MYI’ is not a MyISAM-table
myisamchk: error: ‘/var/lib/mysql/nagios/nagios_statehistory.MYI’ is not a MyISAM-table
myisamchk: error: ‘/var/lib/mysql/nagios/nagios_systemcommands.MYI’ is not a MyISAM-table
The other tables were normal.
Commands:
mysqlcheck --auto-repair -c -o nagios -u <user> -p
-----------------------------------------------------------------------------
(Excerpt)
Repairing tables
nagios.nagios_conninfo
Error : Incorrect file format 'nagios_conninfo'
error : Corrupt
nagios.nagios_customvariablestatus
Error : Incorrect file format 'nagios_customvariablestatus'
error : Corrupt
nagios.nagios_eventhandlers
Error : Incorrect file format 'nagios_eventhandlers'
error : Corrupt
nagios.nagios_hosts
Error : Incorrect file format 'nagios_hosts'
error : Corrupt
nagios.nagios_hoststatus
Error : Incorrect file format 'nagios_hoststatus'
error : Corrupt
nagios.nagios_instances
Error : Incorrect file format 'nagios_instances'
error : Corrupt
nagios.nagios_logentries
Error : Incorrect file format 'nagios_logentries'
error : Corrupt
nagios.nagios_programstatus
Error : Incorrect file format 'nagios_programstatus'
error : Corrupt
nagios.nagios_servicestatus
Error : Incorrect file format 'nagios_servicestatus'
error : Corrupt
nagios.nagios_statehistory
Error : Incorrect file format 'nagios_statehistory'
error : Corrupt
nagios.nagios_systemcommands
Error : Incorrect file format 'nagios_systemcommands'
error : Corrupt
-----------------------------------------------------------------------------
I confirmed the forum, but it was necessary to execute the following command on table, but are there other possible causes?
Commands:
repair table <some_table> USE_FRM;
Is there another way to respond?
We will provide you with the necessary information.
Sincerely,
Kazuya Nakahara