Page 1 of 1

[ndoutils] : Incorrect file format 'nagios_servicestatus' SQ

Posted: Mon Apr 22, 2013 1:21 pm
by intelXIadmin
Hello,

I am getting this error message after logging into our server today. No servers are showing up under any of the active views, like tactical overiew.

[ndoutils] : Incorrect file format 'nagios_servicestatus' SQL: SQL Error [ndoutils] : Incorrect file format 'nagios_servicestatus' SQL: SQL Error

Regards,

Randy.

Re: [ndoutils] : Incorrect file format 'nagios_servicestatus

Posted: Mon Apr 22, 2013 1:51 pm
by abrist
1. Did this machine experience an unexpected loss of power?
2. Do you have backups?
3. Have you tried running the sql repair script?

Re: [ndoutils] : Incorrect file format 'nagios_servicestatus

Posted: Mon Apr 22, 2013 3:29 pm
by intelXIadmin
oops, I fogot to mention versions:

1. OS - Redhat 6.4
2. NagiosXI - 2012R1.8

1. Did this machine experience an unexpected loss of power? Yes
2. Do you have backups? Not of the database
3. Have you tried running the sql repair script? Yes

Now, if I was to lose all the historical data it wouldn't be a problem at all. I just don't want to lose the configurations.

Re: [ndoutils] : Incorrect file format 'nagios_servicestatus

Posted: Tue Apr 23, 2013 8:45 am
by scottwilkerson
By default XI systems have this DB backed up in
/store/backups/mysql/daily/nagios
/store/backups/mysql/weekly/nagios
/store/backups/mysql/monthly/nagios

Do you have these?

Re: [ndoutils] : Incorrect file format 'nagios_servicestatus

Posted: Tue Apr 23, 2013 9:35 am
by intelXIadmin
Yes.

Re: [ndoutils] : Incorrect file format 'nagios_servicestatus

Posted: Tue Apr 23, 2013 10:13 am
by intelXIadmin
I see the files. I did not create them using the backup script. Are they tar files, or just gzip files? How are they restored?

Regards,

Randy.

Re: [ndoutils] : Incorrect file format 'nagios_servicestatus

Posted: Tue Apr 23, 2013 12:06 pm
by scottwilkerson
they are just gzip, and are created on a daily cron, here is an example restore of the nagios DB

Code: Select all

[root@localhost nagios]# cd /store/backups/mysql/daily/nagios
[root@localhost nagios]# ls -l
total 28264
-rw-r--r-- 1 root root 4421384 Apr 12 07:00 nagios_2013-04-12_07h00m.Friday.sql.gz
-rw-r--r-- 1 root root 4692986 Apr 17 07:00 nagios_2013-04-17_07h00m.Wednesday.sql.gz
-rw-r--r-- 1 root root 4789457 Apr 18 07:00 nagios_2013-04-18_07h00m.Thursday.sql.gz
-rw-r--r-- 1 root root 4941059 Apr 21 07:00 nagios_2013-04-21_07h00m.Sunday.sql.gz
-rw-r--r-- 1 root root 4998263 Apr 22 07:00 nagios_2013-04-22_07h00m.Monday.sql.gz
-rw-r--r-- 1 root root 5084448 Apr 23 07:00 nagios_2013-04-23_07h00m.Tuesday.sql.gz
[root@localhost nagios]# gunzip nagios_2013-04-23_07h00m.Tuesday.sql.gz
[root@localhost nagios]# cat nagios_2013-04-23_07h00m.Tuesday.sql | mysql -pnagiosxi nagios

Re: [ndoutils] : Incorrect file format 'nagios_servicestatus

Posted: Wed May 01, 2013 9:53 am
by intelXIadmin
Hello,

I was able to resolve this using a Nagiosxi backup. I run the restore procedure.

Re: [ndoutils] : Incorrect file format 'nagios_servicestatus

Posted: Wed May 01, 2013 10:29 am
by slansing
Excellent, thank you for letting us know.