Database "nagios" = {Table "nagios_logentries" has a problem

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Database "nagios" = {Table "nagios_logentries" has a problem

Post by benhank »

we are getting this error on our offloaded nagios db:
Capture.PNG
i ran the following commands

Code: Select all

/usr/local/nagiosxi/scripts/./repair_databases.sh
which resulted in this error:

Code: Select all

nagios.nagios_logentries
error    : Can't create new tempfile: './nagios/nagios_logentries.TMD'
status   : Operation failed
after the command completed :

Code: Select all

nagios offloaded database repair succeeded
nagiosql offloaded database repair succeeded
however I forced nagios to recheck the error in the screen shot and its still happening
The last time this happened it caused our production server to stop working and we had to do a remote session to get it resolved, can we get a remote session to have this looked at?
You do not have the required permissions to view the files attached to this post.
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Database "nagios" = {Table "nagios_logentries" has a pro

Post by scottwilkerson »

Ben,

Can you log into the offloaded database and run the following

Code: Select all

service mysqld stop
cd /var/lib/mysql/nagios
myisamchk -r -f nagios_logentries.MYI
service mysqld start
rm -f /usr/local/nagiosxi/var/dbmaint.lock
If you continue to have the same issue, I would run the following (replacing nagiosxi with the root password for mysql on that server)

Code: Select all

echo 'repair table nagios_logentries use_frm;' | mysql -t -u root -pnagiosxi nagios
service mysqld restart
From:
https://assets.nagios.com/downloads/nag ... tabase.pdf

Finally if neither of these work, you should be able to

Code: Select all

service mysqld stop
rm -f /var/lib/mysql/nagios/nagios_logentries.TMD
service mysqld start
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: Database "nagios" = {Table "nagios_logentries" has a pro

Post by benhank »

scott wilkerson does it again!
ran this command :

Code: Select all

service mysqld stop
cd /var/lib/mysql/nagios
myisamchk -r -f nagios_logentries.MYI
service mysqld start
rm -f /usr/local/nagiosxi/var/dbmaint.lock
and im all set lock it up guys and thanks for the rest resolution!
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Database "nagios" = {Table "nagios_logentries" has a pro

Post by scottwilkerson »

benhank wrote:scott wilkerson does it again!
ran this command :

Code: Select all

service mysqld stop
cd /var/lib/mysql/nagios
myisamchk -r -f nagios_logentries.MYI
service mysqld start
rm -f /usr/local/nagiosxi/var/dbmaint.lock
and im all set lock it up guys and thanks for the rest resolution!
Awesome!

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked