Nagiosxi tables

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
lamin
Posts: 177
Joined: Thu Oct 28, 2010 6:59 am

Nagiosxi tables

Post by lamin »

Hey guys,
My nagiosxi table (nagios_servicechecks) is empty and I want to know is it the way it suppose to be.


Thanks
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Nagiosxi tables

Post by mguthrie »

Try running the database repair procedure, you might have corruption in that table.

http://assets.nagios.com/downloads/nagi ... tabase.pdf
lamin
Posts: 177
Joined: Thu Oct 28, 2010 6:59 am

Re: Nagiosxi tables

Post by lamin »

i did run the script to repair the database and it was complete successfully, however, i am still not seeing data in the nagios_servicechecks table.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Nagiosxi tables

Post by mguthrie »

Can you post the output from the following?

Code: Select all

cd /usr/local/nagiosxi/scripts
rm -f ../var/dbmaint.lock
./dbmaint.php
lamin
Posts: 177
Joined: Thu Oct 28, 2010 6:59 am

Re: Nagiosxi tables

Post by lamin »

Do you want me to run the command above?
By the way I did not see DBmaint.php command in the scripts directory.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Nagiosxi tables

Post by mguthrie »

Oops, sorry about that. Wrong directory.

Code: Select all

cd /usr/local/nagiosxi/cron
rm -f ../var/dbmaint.lock
./dbmaint.php
lamin
Posts: 177
Joined: Thu Oct 28, 2010 6:59 am

Re: Nagiosxi tables

Post by lamin »

there is no dbmaint.lock in the cron directory.
my nagios_servicechecks and nagios_hostchecks tables still did not get any data. is that normal or is there a solution for it?
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Nagiosxi tables

Post by mguthrie »

there is no dbmaint.lock in the cron directory.
Indeed, the dbmaint.lock file is located in /usr/local/nagiosxi/var, hence the "../var"
my nagios_servicechecks and nagios_hostchecks tables still did not get any data
We still need to see the output from that script.


I would also suggest running the following:

Code: Select all

service mysqld stop
myisamchk -r -f /var/lib/mysql/nagios_*.MYI
service mysqld start
service nagios restart
service ndo2db restart
lamin
Posts: 177
Joined: Thu Oct 28, 2010 6:59 am

Re: Nagiosxi tables

Post by lamin »

Here is the output of the repaimysql.sh script. As you see it went successful but I am still not seeing data.
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: Nagiosxi tables

Post by mguthrie »

What I need to know is whether or not the repair run is actually succeeding. The way that I can identify that is by seeing the output from the below commands:

Code: Select all

cd /usr/local/nagiosxi/cron
rm -f ../var/dbmaint.lock
./dbmaint.php
The above message is the output from the actual repair run, which doesn't always succeed.
Locked