Nagiosql TBL_LOGBOOK Incorrect File Format

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
darkservices
Posts: 6
Joined: Thu Jan 29, 2015 11:45 am

Nagiosql TBL_LOGBOOK Incorrect File Format

Post by darkservices »

Having picked up an aging nagios installation, and trying to update it to 2014 I discovered we have some preliminary DB issues.

Current version is 2012r2.9 on Centos 6.3


[root@localhost scripts]# ./repairmysql.sh nagiosql tbl_logbook
DATABASE: nagiosql
TABLE: tbl_logbook
/var/lib/mysql/nagiosql /usr/local/nagiosxi/scripts
Stopping mysqld: [ OK ]
myisamchk: error: 'tbl_logbook' is not a MyISAM-table
Starting mysqld: [ OK ]
/usr/local/nagiosxi/scripts

===============
REPAIR COMPLETE

Running MySqlCheck again on nagiosql gives all OK’s except the problematical table below -:

nagiosql.tbl_lnkTimeperiodToTimeperiod OK
nagiosql.tbl_logbook
Error : Incorrect file format 'tbl_logbook'
error : Corrupt



I have attached the output from an attempted 2014 update in case this offers some clues?

Also attached is the config error snapshot that was created when I tried to simply tried to update an existing service in the nagiosXI gui. im presuming theres something in there that relies on the broken nagiosql DB. ..?

Please advise.. built in repair scripts say Repair complete. However, its not completed successfully!

Thanks in anticipation gurus
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagiosql TBL_LOGBOOK Incorrect File Format

Post by lmiltchev »

Run the following command and see if this is going to fix the issue:

Code: Select all

echo "use nagiosql;repair table tbl_logbook use_frm;" | mysql -pnagiosxi
Be sure to check out our Knowledgebase for helpful articles and solutions!
darkservices
Posts: 6
Joined: Thu Jan 29, 2015 11:45 am

Re: Nagiosql TBL_LOGBOOK Incorrect File Format

Post by darkservices »

fantastic. thank you. is this a result of a basic DB corruption? and do you think it would hinder general operation of Nagios?

also, would it be worth reloading after such a repair? you can probably tell im conditioned by too many years of Windows

:P :P :P :P :P

[root@localhost ~]# mysqlcheck -u root -p nagiosql
Enter password:
nagiosql.tbl_command OK
nagiosql.tbl_contact OK
nagiosql.tbl_contactgroup OK
nagiosql.tbl_contacttemplate OK
nagiosql.tbl_domain OK
nagiosql.tbl_host OK
nagiosql.tbl_hostdependency OK
nagiosql.tbl_hostescalation OK
nagiosql.tbl_hostextinfo OK
nagiosql.tbl_hostgroup OK
nagiosql.tbl_hosttemplate OK
nagiosql.tbl_info OK
nagiosql.tbl_lnkContactToCommandHost OK
nagiosql.tbl_lnkContactToCommandService OK
nagiosql.tbl_lnkContactToContactgroup OK
nagiosql.tbl_lnkContactToContacttemplate OK
nagiosql.tbl_lnkContactToVariabledefinition OK
nagiosql.tbl_lnkContactgroupToContact OK
nagiosql.tbl_lnkContactgroupToContactgroup OK
nagiosql.tbl_lnkContacttemplateToCommandHost OK
nagiosql.tbl_lnkContacttemplateToCommandService OK
nagiosql.tbl_lnkContacttemplateToContactgroup OK
nagiosql.tbl_lnkContacttemplateToContacttemplate OK
nagiosql.tbl_lnkContacttemplateToVariabledefinition OK
nagiosql.tbl_lnkHostToContact OK
nagiosql.tbl_lnkHostToContactgroup OK
nagiosql.tbl_lnkHostToHost OK
nagiosql.tbl_lnkHostToHostgroup OK
nagiosql.tbl_lnkHostToHosttemplate OK
nagiosql.tbl_lnkHostToVariabledefinition OK
nagiosql.tbl_lnkHostdependencyToHost_DH OK
nagiosql.tbl_lnkHostdependencyToHost_H OK
nagiosql.tbl_lnkHostdependencyToHostgroup_DH OK
nagiosql.tbl_lnkHostdependencyToHostgroup_H OK
nagiosql.tbl_lnkHostescalationToContact OK
nagiosql.tbl_lnkHostescalationToContactgroup OK
nagiosql.tbl_lnkHostescalationToHost OK
nagiosql.tbl_lnkHostescalationToHostgroup OK
nagiosql.tbl_lnkHostgroupToHost OK
nagiosql.tbl_lnkHostgroupToHostgroup OK
nagiosql.tbl_lnkHosttemplateToContact OK
nagiosql.tbl_lnkHosttemplateToContactgroup OK
nagiosql.tbl_lnkHosttemplateToHost OK
nagiosql.tbl_lnkHosttemplateToHostgroup OK
nagiosql.tbl_lnkHosttemplateToHosttemplate OK
nagiosql.tbl_lnkHosttemplateToVariabledefinition OK
nagiosql.tbl_lnkServiceToContact OK
nagiosql.tbl_lnkServiceToContactgroup OK
nagiosql.tbl_lnkServiceToHost OK
nagiosql.tbl_lnkServiceToHostgroup OK
nagiosql.tbl_lnkServiceToServicegroup OK
nagiosql.tbl_lnkServiceToServicetemplate OK
nagiosql.tbl_lnkServiceToVariabledefinition OK
nagiosql.tbl_lnkServicedependencyToHost_DH OK
nagiosql.tbl_lnkServicedependencyToHost_H OK
nagiosql.tbl_lnkServicedependencyToHostgroup_DH OK
nagiosql.tbl_lnkServicedependencyToHostgroup_H OK
nagiosql.tbl_lnkServicedependencyToService_DS OK
nagiosql.tbl_lnkServicedependencyToService_S OK
nagiosql.tbl_lnkServiceescalationToContact OK
nagiosql.tbl_lnkServiceescalationToContactgroup OK
nagiosql.tbl_lnkServiceescalationToHost OK
nagiosql.tbl_lnkServiceescalationToHostgroup OK
nagiosql.tbl_lnkServiceescalationToService OK
nagiosql.tbl_lnkServicegroupToService OK
nagiosql.tbl_lnkServicegroupToServicegroup OK
nagiosql.tbl_lnkServicetemplateToContact OK
nagiosql.tbl_lnkServicetemplateToContactgroup OK
nagiosql.tbl_lnkServicetemplateToHost OK
nagiosql.tbl_lnkServicetemplateToHostgroup OK
nagiosql.tbl_lnkServicetemplateToServicegroup OK
nagiosql.tbl_lnkServicetemplateToServicetemplate OK
nagiosql.tbl_lnkServicetemplateToVariabledefinition OK
nagiosql.tbl_lnkTimeperiodToTimeperiod OK
nagiosql.tbl_logbook OK
nagiosql.tbl_mainmenu OK
nagiosql.tbl_service OK
nagiosql.tbl_servicedependency OK
nagiosql.tbl_serviceescalation OK
nagiosql.tbl_serviceextinfo OK
nagiosql.tbl_servicegroup OK
nagiosql.tbl_servicetemplate OK
nagiosql.tbl_settings OK
nagiosql.tbl_submenu OK
nagiosql.tbl_timedefinition OK
nagiosql.tbl_timeperiod OK
nagiosql.tbl_user OK
nagiosql.tbl_variabledefinition OK
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagiosql TBL_LOGBOOK Incorrect File Format

Post by scottwilkerson »

darkservices wrote:fantastic. thank you. is this a result of a basic DB corruption? and do you think it would hinder general operation of Nagios?

also, would it be worth reloading after such a repair? you can probably tell im conditioned by too many years of Windows
Yes. But it actually shouldn't affect anything in Nagios as we don't even use that table... I wouldn't worry about reloading anything.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
darkservices
Posts: 6
Joined: Thu Jan 29, 2015 11:45 am

Re: Nagiosql TBL_LOGBOOK Incorrect File Format

Post by darkservices »

Having moved on from this, I have reattempted the 2014 upgrade.

im still seeing simililar, if not identical, warninigs and errors, and the upgrade appears to fail.

Ive attached the log file of the upgrade process, I didn't break it up so the errors can be seen in context, but it would seem the errored DB Table wasn't a major factor.

These errors seem similar to those seen when trying to apply a new config in CCM, the snaphot of which is also attached.

I wonder if you have any other ideas as to what I might try to get upto date...

Its not a live server, so I wouldn't ignore the possibility of a fresh install of 2014, and backup restore. presuming of course we can restore a 2012 version backup into 2014.

ive tried remarking out the obsolete parameters/variables and so on in the relevant template file, to resolve the specific errors, but this didn't appear to make any difference. its almost like we cannot write to some parts of the database, although we can to others, like changing a host name of a host.
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: Nagiosql TBL_LOGBOOK Incorrect File Format

Post by scottwilkerson »

Can you fix any configuration errors before applying config.

It appears you have a service on 163.160.162.246 that doesn't have a host specified
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
darkservices
Posts: 6
Joined: Thu Jan 29, 2015 11:45 am

Re: Nagiosql TBL_LOGBOOK Incorrect File Format

Post by darkservices »

Hi all

I have deleted this service.

I figured it would be ok to have a bank of services with no host, ready and waiting to have hosts entered. wrong.

I have since deleted the service.

this still leaves the other errors which appear to be impossible to remove either by editing the txt cfg files, or by editing the config in the XI gui, due to the apply config error.

rather frustrating. I guess ill have to use some support credits
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagiosql TBL_LOGBOOK Incorrect File Format

Post by scottwilkerson »

I would do the following
CCM -> Tools -> Write Config Tool and click
Delete

Then:
Write
Verify

If there is a config error, fix the error displayed through the CCM and repeat the
Write
Verify

until there are no errors, then Apply Configuration.

Now, DO NOT edit .cfg files directly unless you place them in the static directory as the will at some poing be over written by the CCM during an apply config process.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked