Repair database
-
ednaldojta
- Posts: 103
- Joined: Tue Apr 07, 2015 7:52 am
Repair database
Good morning friends!
every time I take the reports, happens to my my Nagios application, lose connection to the database. How can I solve?
every time I take the reports, happens to my my Nagios application, lose connection to the database. How can I solve?
You do not have the required permissions to view the files attached to this post.
Re: Repair database
What is the version of the Nagios XI that you are currently using? Is MySQL DB local or offloaded to a remote server? Run the following commands, and show the output:
If you are using mariadb, run:
It seems like you need to repair your database and/or truncate some of the tables (if they are getting too large). Please, review our documentation on the topic here:
https://assets.nagios.com/downloads/nag ... tabase.pdf
Also, see how you can optimize your database settings in Nagios XI here:
https://assets.nagios.com/downloads/nag ... zation.pdf
Code: Select all
uname -a
cat /etc/*release
tail -20 /var/log/mysqld.logCode: Select all
tail -20 /var/log/mariadb/mariadb.loghttps://assets.nagios.com/downloads/nag ... tabase.pdf
Also, see how you can optimize your database settings in Nagios XI here:
https://assets.nagios.com/downloads/nag ... zation.pdf
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
ednaldojta
- Posts: 103
- Joined: Tue Apr 07, 2015 7:52 am
Re: Repair database
I'm using Nagios XI 5.2.0 version
You do not have the required permissions to view the files attached to this post.
Re: Repair database
Did you repair the DB prior to running the tail command? I don't see any errors/crashed tables in the mysqld.log...
Are you still seeing the DB connection errors in the web UI or your issue has been resolved?
Are you still seeing the DB connection errors in the web UI or your issue has been resolved?
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
ednaldojta
- Posts: 103
- Joined: Tue Apr 07, 2015 7:52 am
Re: Repair database
It is always so happens and back normal!
but should this not happen again!
but should this not happen again!
Re: Repair database
Database corruption is usually caused by power outages, running out of disk space or improper shutting down the Nagios XI server.
Many times users would right-click on the Nagios XI VM in VMWare Workstation/ESXi/Vsphere and select "Power Off". This is wrong - it is like pulling off the power cord. The correct way for shutting down the Nagios XI server would be to issue the following command in the command line:
How much room do you have on the hard drive? Run the following commands and show the output:
Many times users would right-click on the Nagios XI VM in VMWare Workstation/ESXi/Vsphere and select "Power Off". This is wrong - it is like pulling off the power cord. The correct way for shutting down the Nagios XI server would be to issue the following command in the command line:
Code: Select all
shutdown -h nowCode: Select all
df -h
df -iBe sure to check out our Knowledgebase for helpful articles and solutions!
-
ednaldojta
- Posts: 103
- Joined: Tue Apr 07, 2015 7:52 am
Re: Repair database
To turn off, I use the command line.
Not now this happens! And only happens when I do the extraction of reports.
Not now this happens! And only happens when I do the extraction of reports.
You do not have the required permissions to view the files attached to this post.
Re: Repair database
It could be that your server is off-loaded to a remote server and the repair script isn't fixing the corruption.
Can you login to the XI server as root, run the following and post the output? This will tell us is the server is local or not.
Another thing is could be the Max Connections to the mysql database needs to be increased. Take a look at this article to do that.
https://support.nagios.com/kb/article.php?id=513
Can you login to the XI server as root, run the following and post the output? This will tell us is the server is local or not.
Code: Select all
grep dbserver /usr/local/nagiosxi/html/config.inc.phphttps://support.nagios.com/kb/article.php?id=513
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
ednaldojta
- Posts: 103
- Joined: Tue Apr 07, 2015 7:52 am
Re: Repair database
My bank is local.
You do not have the required permissions to view the files attached to this post.
Re: Repair database
What report are you running to cause the SQL database corruption?
Did you follow the KB article that I posted and did you try to run the report again to see if that fixes the issue?
Did you follow the KB article that I posted and did you try to run the report again to see if that fixes the issue?
Be sure to check out our Knowledgebase for helpful articles and solutions!