SQL Error [ndoutils] : Incorrect file format 'nagios_notific

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Kujab
Posts: 23
Joined: Mon Jan 16, 2012 6:06 am

SQL Error [ndoutils] : Incorrect file format 'nagios_notific

Post by Kujab »

Hello,
I saw this error message "SQL Error [ndoutils] : Incorrect file format 'nagios_notifications'" when I tried to check Service notification. Then I tried this command:
/usr/local/nagiosxi/scripts/repair_databases.sh
But there were some FAILS. Then I tried the command
mysqlcheck -r -f -u root -pnagiosxi --use_frm --all-databases
from this thread:
https://support.nagios.com/forum/viewto ... =6&t=46960
It solved almost everything except one error:
nagiosxi.xi_incidents
note : The storage engine for the table doesn't support repair
nagiosxi.xi_meta
warning : Number of rows changed from 0 to 79
status : OK
nagiosxi.xi_options
warning : Number of rows changed from 0 to 160
status : OK
nagiosxi.xi_sysstat
warning : Number of rows changed from 0 to 19
status : OK
nagiosxi.xi_usermeta
warning : Number of rows changed from 0 to 529
status : OK
nagiosxi.xi_users
warning : Number of rows changed from 0 to 11
status : OK

How to fix nagiosxi.xi_incidents

Also it seems I cannot see service notification or state history for particular services. There is nothing

Ho to solve that ?

Thank you for your help

Best regards

Jakub Hauzner
Kujab
Posts: 23
Joined: Mon Jan 16, 2012 6:06 am

Re: SQL Error [ndoutils] : Incorrect file format 'nagios_not

Post by Kujab »

One more finding. There are no older service state history and service notifications records visible.

The system is:
Nagios XI Version : 5.4.13
localhost.localdomain 2.6.32-696.18.7.el6.x86_64 x86_64
CentOS release 6.9 (Final)
Gnome is not installed

Thank you for your help.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: SQL Error [ndoutils] : Incorrect file format 'nagios_not

Post by scottwilkerson »

Now that the databases are all repaired, you likely need to restart nagios so the database know which hosts and services are still active

Code: Select all

service nagios restart
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Kujab
Posts: 23
Joined: Mon Jan 16, 2012 6:06 am

Re: SQL Error [ndoutils] : Incorrect file format 'nagios_not

Post by Kujab »

I restared Nagios service. But still cannot see older service/host history and notifications. Only from 22nd of June. Any idea ?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: SQL Error [ndoutils] : Incorrect file format 'nagios_not

Post by scottwilkerson »

You can try to restart ndo2db

Code: Select all

service ndo2db restart
If that doesn't work, please send your profile.zip from Admin -> System Profile
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Kujab
Posts: 23
Joined: Mon Jan 16, 2012 6:06 am

Re: SQL Error [ndoutils] : Incorrect file format 'nagios_not

Post by Kujab »

It didn't help, I sent you a PM with profile.zip.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: SQL Error [ndoutils] : Incorrect file format 'nagios_not

Post by scottwilkerson »

Kujab wrote:I restared Nagios service. But still cannot see older service/host history and notifications. Only from 22nd of June. Any idea ?
Somehow I misread the above the first time, I thought you were saying the service status said it was from back then.

This sounds like the data was truncated during the database repair.

From this, the suggestions would be to restore a backup that would have the full database.

https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Kujab
Posts: 23
Joined: Mon Jan 16, 2012 6:06 am

Re: SQL Error [ndoutils] : Incorrect file format 'nagios_not

Post by Kujab »

Unfortunately I have older backup (from March). Is it possible to merge current status and that old backup only for this table ?

There was an issue with FTP backup. I need passive and also number of files have to be corrected.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: SQL Error [ndoutils] : Incorrect file format 'nagios_not

Post by scottwilkerson »

can you show the output of the following:

Code: Select all

ls -al /store/backups/mysql/daily/nagios
and

Code: Select all

ls -al /store/backups/mysql/weekly/nagios
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Kujab
Posts: 23
Joined: Mon Jan 16, 2012 6:06 am

Re: SQL Error [ndoutils] : Incorrect file format 'nagios_not

Post by Kujab »

The outputs are following:
total 17072
drwxr-xr-x 2 root root 4096 Jun 25 07:00 .
drwxr-xr-x 7 root root 4096 Feb 25 2017 ..
-rw-r--r-- 1 root root 466 Jun 19 07:00 nagios_2018-06-19_07h00m.Tuesday.sql.gz
-rw-r--r-- 1 root root 468 Jun 20 07:00 nagios_2018-06-20_07h00m.Wednesday.sql.gz
-rw-r--r-- 1 root root 467 Jun 21 07:00 nagios_2018-06-21_07h00m.Thursday.sql.gz
-rw-r--r-- 1 root root 465 Jun 22 07:00 nagios_2018-06-22_07h00m.Friday.sql.gz
-rw-r--r-- 1 root root 8708283 Jun 24 07:00 nagios_2018-06-24_07h00m.Sunday.sql.gz
-rw-r--r-- 1 root root 8743817 Jun 25 07:00 nagios_2018-06-25_07h00m.Monday.sql.gz
[root@localhost ~]# ls -al /store/backups/mysql/weekly/nagios
total 120312
drwxr-xr-x 2 root root 4096 Jun 23 07:00 .
drwxr-xr-x 7 root root 4096 Feb 25 2017 ..
-rw-r--r-- 1 root root 29235579 May 26 07:00 nagios_week.21.2018-05-26_07h00m.sql.gz
-rw-r--r-- 1 root root 29360683 Jun 2 07:00 nagios_week.22.2018-06-02_07h00m.sql.gz
-rw-r--r-- 1 root root 29341356 Jun 9 07:00 nagios_week.23.2018-06-09_07h00m.sql.gz
-rw-r--r-- 1 root root 466 Jun 16 07:00 nagios_week.24.2018-06-16_07h00m.sql.gz
-rw-r--r-- 1 root root 8646017 Jun 23 07:00 nagios_week.25.2018-06-23_07h00m.sql.gz
-rw-r--r-- 1 root root 26594762 Dec 2 2017 nagios_week.48.2017-12-02_07h00m.sql.gz
[root@localhost ~]#

Also important is that we have had an incident on 12th of June when VMware server (on which is Nagios hosted) run out of the disk space.
I started some repair_databases, I suppose it was fine. But later on 22nd of June appeared this issue. Maybe there is relationship.
Locked