Services Disappered

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
John12
Posts: 48
Joined: Fri Nov 11, 2011 6:16 am

Services Disappered

Post 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.
You do not have the required permissions to view the files attached to this post.
John12
Posts: 48
Joined: Fri Nov 11, 2011 6:16 am

Re: Services Disappered

Post 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:
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Services Disappered

Post 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
John12
Posts: 48
Joined: Fri Nov 11, 2011 6:16 am

Re: Services Disappered

Post 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. :(
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Services Disappered

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
John12
Posts: 48
Joined: Fri Nov 11, 2011 6:16 am

Re: Services Disappered

Post 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.
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Services Disappered

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
John12
Posts: 48
Joined: Fri Nov 11, 2011 6:16 am

Re: Services Disappered

Post 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.
You do not have the required permissions to view the files attached to this post.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Services Disappered

Post 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.
John12
Posts: 48
Joined: Fri Nov 11, 2011 6:16 am

Re: Services Disappered

Post by John12 »

Thanks for the info.. i keep in mind.
Locked