Nagios XI -SQL: SQL Error [ndoutils] : Table './nagios/nagio

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
GacoAdmin110
Posts: 33
Joined: Mon Aug 31, 2015 1:30 pm

Nagios XI -SQL: SQL Error [ndoutils] : Table './nagios/nagio

Post by GacoAdmin110 »

SQL: SQL Error [ndoutils] : Table './nagios/nagios_servicestatus' is marked as crashed and should be repaired SQL: SQL Error [ndoutils] : Table './nagios/nagios_servicestatus' is marked as crashed and should be repaired SQL: SQL Error [ndoutils] : Table './nagios/nagios_servicestatus' is marked as crashed and should be repaired SQL: SQL Error [ndoutils] : Table './nagios/nagios_servicestatus' is marked as crashed and should be repaired SQL: SQL Error [ndoutils] : Table './nagios/nagios_servicestatus' is marked as crashed and should be repaired SQL: SQL Error [ndoutils] : Table './nagios/nagios_servicestatus' is marked as crashed and should be repaired SQL: SQL Error [ndoutils] : Table './nagios/nagios_servicestatus' is marked as crashed and should be repaired

Good Afternoon,

This is what I see in the web console all of a sudden, and nothing seems to be reporting any longer.

Anyone have a fix for this one?? :?:

Thanks much!

Mike
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Nagios XI -SQL: SQL Error [ndoutils] : Table './nagios/n

Post by Box293 »

Have you run out of disk space on your XI server?

I'll get you to check the amount of free disk space on your XI server. Type the following at the command prompt:

Code: Select all

df -h
df -i
If disk usage is your problem, run these commands to produce a breakdown of the directories at / (NOTE: This may take some time to finish).

Code: Select all

cd /
du -sh *
If you want to see more detail about a directory, cd into it and run the du -sh * command again.

If you need to add extra disk space you can follow this guide:

http://assets.nagios.com/downloads/nagi ... M_Disk.pdf

Regardless, please run these commands on your Nagios XI server in an SSH session:

Code: Select all

cd /usr/local/nagiosxi/scripts/
./repair_databases.sh
This may take a while to complete. Once it has, please scroll back up through the history to make sure there were not any database errors (you may see an ndo2db error when stopping the service but this is ok).
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
GacoAdmin110
Posts: 33
Joined: Mon Aug 31, 2015 1:30 pm

Re: Nagios XI -SQL: SQL Error [ndoutils] : Table './nagios/n

Post by GacoAdmin110 »

OK I ran the commands & the database is good to go now...thank you!

On the subject of disk space...yes I am running low, and have tried the supplied PDF instructions, but it crashes the server when I run the disk expansion steps.

The USR & VAR folders are using 4.5GB of space...can I clear them??

Thanks!
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Nagios XI -SQL: SQL Error [ndoutils] : Table './nagios/n

Post by ssax »

You can't clear all of the files in /usr and /var. You could clear some of the logs (/var/log/messages, /var/log/mysqld.log, /var/log/snmptt/*), theses are just examples.

At what point in the steps does it crash the server and what do you mean when you say crash?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios XI -SQL: SQL Error [ndoutils] : Table './nagios/n

Post by lmiltchev »

You can delete some of the old logs in the "/var/log" directory and sub-directories. You can also delete whatever you don't need in the /tmp/" directory. Maybe you have some old backups that you can delete in "/store/backups/nagiosxi" as well.
Be sure to check out our Knowledgebase for helpful articles and solutions!
GacoAdmin110
Posts: 33
Joined: Mon Aug 31, 2015 1:30 pm

Re: Nagios XI -SQL: SQL Error [ndoutils] : Table './nagios/n

Post by GacoAdmin110 »

ssax wrote:You can't clear all of the files in /usr and /var. You could clear some of the logs (/var/log/messages, /var/log/mysqld.log, /var/log/snmptt/*), theses are just examples.

At what point in the steps does it crash the server and what do you mean when you say crash?
When I finished this point in the steps the server would not come up any longer after the reboot:

To resize a partition, you actually “delete” it and then add a new one with the new size, making sure to place the beginning of the new
partition at the same sector/cylinder as the old one started.
Command (m for help): d
Partition number (1-4): 2
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
You should be able to accept the defaults for the start and end point. Double-check that they make sense when compared to the
information printed earlier. Finally, make sure the partition type is set correctly:
Command (m for help): t
Partition number (1-4): 2
Hex code (type L to list codes): 8e
Changed system type of partition 2 to 8e (Linux LVM)
At this point you are done making your changes, and just need to write them to the disk. It is a good idea to print the new partition table
to ensure you entered things correctly. Once thing look okay, you can commit (write) the partition table to disk:
Command (m for help): w
The partition table has been altered!
You will now need to reboot the virtual machine to allow the kernel to recognize the new partition table.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Nagios XI -SQL: SQL Error [ndoutils] : Table './nagios/n

Post by Box293 »

What is the output of these commands:

Code: Select all

ls -al /dev/mapper/
ls -al /dev/sd*
mount
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
GacoAdmin110
Posts: 33
Joined: Mon Aug 31, 2015 1:30 pm

Re: Nagios XI -SQL: SQL Error [ndoutils] : Table './nagios/n

Post by GacoAdmin110 »

Box293 wrote:What is the output of these commands:

Code: Select all

ls -al /dev/mapper/
ls -al /dev/sd*
mount
/store/backups/nagiosxi$ ls -al /dev/mapper/
total 0
drwxr-xr-x 2 root root 100 Dec 29 12:47 .
drwxr-xr-x 17 root root 3660 Dec 29 12:48 ..
crw-rw---- 1 root root 10, 58 Dec 29 12:48 control
lrwxrwxrwx 1 root root 7 Dec 29 12:48 VolGroup-lv_root -> ../dm-0
lrwxrwxrwx 1 root root 7 Dec 29 12:48 VolGroup-lv_swap -> ../dm-1
/store/backups/nagiosxi$ ls -al /dev/sd*
brw-rw---- 1 root disk 8, 0 Dec 29 12:48 /dev/sda
brw-rw---- 1 root disk 8, 1 Dec 29 12:48 /dev/sda1
brw-rw---- 1 root disk 8, 2 Dec 29 12:48 /dev/sda2
/store/backups/nagiosxi$ mount
/dev/mapper/VolGroup-lv_root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda1 on /boot type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Nagios XI -SQL: SQL Error [ndoutils] : Table './nagios/n

Post by Box293 »

GacoAdmin110 wrote:
ssax wrote:You can't clear all of the files in /usr and /var. You could clear some of the logs (/var/log/messages, /var/log/mysqld.log, /var/log/snmptt/*), theses are just examples.

At what point in the steps does it crash the server and what do you mean when you say crash?
When I finished this point in the steps the server would not come up any longer after the reboot
What is appearing on the console, what is the exact error message that is preventing it from coming up? A screenshot might help.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
GacoAdmin110
Posts: 33
Joined: Mon Aug 31, 2015 1:30 pm

Re: Nagios XI -SQL: SQL Error [ndoutils] : Table './nagios/n

Post by GacoAdmin110 »

I don't have the specific error any longer as the screen shot of it is lost.

The server would not boot whatsoever. It was giving some sort of no OS disk found type of error.
Locked