Page 1 of 2

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

Posted: Tue Dec 29, 2015 2:16 pm
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

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

Posted: Tue Dec 29, 2015 2:30 pm
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).

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

Posted: Tue Dec 29, 2015 2:37 pm
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!

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

Posted: Tue Dec 29, 2015 2:50 pm
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?

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

Posted: Tue Dec 29, 2015 2:52 pm
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.

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

Posted: Tue Dec 29, 2015 3:01 pm
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.

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

Posted: Tue Dec 29, 2015 3:20 pm
by Box293
What is the output of these commands:

Code: Select all

ls -al /dev/mapper/
ls -al /dev/sd*
mount

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

Posted: Tue Dec 29, 2015 3:47 pm
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)

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

Posted: Tue Dec 29, 2015 3:53 pm
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.

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

Posted: Tue Dec 29, 2015 4:21 pm
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.