Root Cause:- Nagios is constantly read and write to the mysql database, killing the mysqld process will cause the database table crashed.
Below are the most common action cause the database table crashed
- power outages,
- running out of disk space
- improper shutting down
You will see similar error log show in mysqld.log

You also will see SQL Error show on the NagiosXi Page

Solution:-
You can repair the nagios and nagiosql databases by running the following commands in the command line as the root user:

Above script will repair both databases (nagios and nagiosql)