Page 1 of 1

Services Disappered

Posted: Mon Sep 24, 2012 2:07 am
by John12
hi,

VMware Virtual Machine (64-bit) 2011R3.3 on centos 5.7 64bit running VMWare workstation.

error msg1: SQL: SQL Error [ndoutils] : Incorrect file format 'nagios_servicestatus'
error msg2: SQL: SQL Error [ndoutils] : Table './nagios/nagios_servicestatus'

My core config manager has the serivce details but home service panel doesnt shows up.
I am getting error as
no service.JPG
I tried

Code: Select all

/usr/local/nagiosxi/scripts/repairmysql.sh nagios
(and)

Code: Select all

/usr/local/nagiosxi/scripts/repairmysql.sh nagiosql 
, but that didnt solved the services to appear.

I navigate on the forum and found similar post with method to try..

Code: Select all

service mysqld stop
cd /var/lib/mysql/nagios
myisamchk -r -f nagios_<corrupted_table>

service mysqld start
rm -f /usr/local/nagiosxi/var/dbmaint.lock
/usr/local/nagiosxi/cron/dbmaint.php 
I would like to know what is the exact syntax i follow..
myisamchk -r -f nagios_<corrupted_table> .. i see servicestatus.frm, servicestatus.MYI, servicestatus.MYD

I tried

Code: Select all

mysqlcheck --auto-repair -A -pnagiosxi
with my custom password. and got the following errors as shown..
running mysqlcheck --auto-repair -A -pnagiosxi.JPG
Pls let me know what else i try to bring the service details.

awaiting ..
Thanks.

Re: Services Disappered

Posted: Mon Sep 24, 2012 10:00 am
by John12
Some with any workaround.. i would be greatly thankful.

Being stuck up here where i have no other go to reconfigure a new nagiosxi. :oops:

Re: Services Disappered

Posted: Mon Sep 24, 2012 10:42 am
by mguthrie
This will get you what you need.

Code: Select all

service mysqld stop
cd /var/lib/mysql/nagios
myisamchk -r -f *.MYI
service mysqld start

Re: Services Disappered

Posted: Tue Sep 25, 2012 3:00 am
by John12
HI,

Thanks for the reply.
I executed the commands.. and it did some fixing on records...
but as usual my service panel is empty.
below is the screenhost.
no service.JPG
I can see the services on nagioscore and i am getting alerts on mail.
nagios core.JPG
Pls help. what else i need to do..

awaiting response. :(

Re: Services Disappered

Posted: Tue Sep 25, 2012 7:33 am
by scottwilkerson
Lets run the following for a few minutes to see if there are any other database table errors
  • tail -f /var/log/mysql.log

Re: Services Disappered

Posted: Wed Sep 26, 2012 8:03 am
by John12
hi..

I monitored mysqld log.. here is the screenshot.
mysql log.JPG
what else.. Error is incorrect file format in tables.

regards,
John.

Re: Services Disappered

Posted: Thu Sep 27, 2012 3:25 pm
by scottwilkerson
Do you have a backup of the nagios database from before this problem occured?

Code: Select all

ls -l /store/backups/mysql/daily/nagios

Re: Services Disappered

Posted: Mon Nov 12, 2012 1:28 am
by John12
Hi ,
Sorry for late reply.

When i had the service Detail disappeared issue. I tried but lastly gave up and installed the nagiosxi VM again.
But now today i again got the service detail crashed error.. (screenshot attached)
nagios alert.JPG
But i followed.

service mysqld stop
cd /var/lib/mysql/nagios
myisamchk -r -f *.MYI
service mysqld start

It did fixed some tables.

and my service details were back. I don't know why same procedure not fixed the same problem which i had once before.

Any way.. NagiosXI works ok now for me. just FYI.

Thanks for great support.

John.

Re: Services Disappered

Posted: Mon Nov 12, 2012 10:46 am
by mguthrie
Glad it's working again. Since you're running this on Vmware Workstation, if you ever have to shutdown the XI VM, make sure to run:

Code: Select all

shutdown -h now
From the VM's shell. Don't use Vmware Workstations "Power Off" option because you'll corrupt your database tables almost every time you do that. MySQL doesn't play nice with a hard power off.

Re: Services Disappered

Posted: Wed Nov 28, 2012 2:42 am
by John12
Thanks for the info.. i keep in mind.