NagiosXI is throwing Database Error message. (OS - RHEL 7)
These are the steps that we have followed to fix this error but, this issue is still exist. Kindly assist.Database Error
A database connection error has been detected, please follow the repair prompt below. If the issue persists, please contact Nagios support.
Run the following from the CLI as root to attempt to repair the DB:
/usr/local/nagiosxi/scripts/repair_databases.sh
(Please note that i am unable to find the NagiosXI version as, GUI is down. Kindly share the command to find the same)
1. /Var was full and we ran the below command to fix this space issue. (This freed up the good amount of space)
echo "truncate table xi_events; truncate table xi_meta; truncate table xi_eventqueue;" | mysql -u root -pnagiosxi nagiosxi
2. Ran the following command to repair the database
Code: Select all
[root@losatlngs01 mysql]# /usr/local/nagiosxi/scripts/repair_databases.sh
DATABASE: nagios
TABLE:
/var/lib/mysql/nagios /var/lib/mysql
- recovering (with sort) MyISAM-table 'nagios_acknowledgements'
**********************
- recovering (with sort) MyISAM-table 'xi_users'
Data records: 55
- Fixing index 1
- Fixing index 2
Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.
/var/lib/mysql
===============
REPAIR COMPLETE
===============
=======================
nagios database repair succeeded
nagiosql database repair succeeded
nagiosxi database repair succeeded
[root@losatlngs01 mysql]#