Page 1 of 1

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

Posted: Thu Nov 21, 2019 1:04 pm
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?

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

Posted: Thu Nov 21, 2019 1:29 pm
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

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

Posted: Thu Nov 21, 2019 1:43 pm
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!

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

Posted: Thu Nov 21, 2019 1:52 pm
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