Page 1 of 1

Services database problem result of no disk space

Posted: Thu Oct 25, 2012 3:26 pm
by bsquadrito
Dear Support,

Our VMWare image running Nagios XI 2011R2.3 was down to almost 10% disk space available, just before I went on a 10 day vacation. I crossed my fingers that it would last until I got back, but it did not. Although all monitored services still appear in the list in Admin, Core Config Manager; the Views, HostGroup Overview shows "No Services found" next to each of the hosts listed and Service Detail shows "No matching services found".

First, we addressed the disk space issue. It now has 28 GB available. Next, I tried (at least 3) database repair procedures from the wiki and the forums, and while the repair script did claim it fixed some things, the symptoms have not changed. When I look at the database restore procedure, it seems like the weekly backup got bigger and bigger until the October 6th weekly, and then fell to less than half a MB. When I tried restoring that 10/6 weekly, I get the following:
TS=1351195764
Extracting backup to /store/backups/nagiosxi/1351195764-restore...
Archive: /store/backups/mysql/weekly/nagios/nagios_week.40.2012-10-06_07h00m.sql.gz
In /root...
Unable to find files to restore in /root


The command was:
/usr/local/nagiosxi/scripts/restore_xi.sh /store/backups/mysql/weekly/nagios/nagios_week.40.2012-10-06_07h00m.sql.gz

BTW, I use file completion in the shell, but had to retype it here, so if there's typos, they're only here. :-)


=== 8>< ===
===System:====

LINNagios.bancorp.local 2.6.32-220.13.1.el6.i686 i686
CentOS release 6.2 (Final)
Gnome Installed

===Apache Information====

PHP Version: 5.3.3
Agent: Mozilla/5.0 (Windows NT 5.1; rv:16.0) Gecko/20100101 Firefox/16.0
Server Name: linnagios.bancorp.local
Server Address: 10.112.16.75
Server Port: 443

=== 8>< ===


What should I try, next?

Thank you in advance,

Brian

Re: Services database problem result of no disk space

Posted: Thu Oct 25, 2012 4:29 pm
by scottwilkerson
bsquadrito wrote:The command was:
/usr/local/nagiosxi/scripts/restore_xi.sh /store/backups/mysql/weekly/nagios/nagios_week.40.2012-10-06_07h00m.sql.gz
this is incorrect.. The restore script is for backups made with /usr/local/nagiosxi/scripts/backup_xi.sh

Anyways...

You should be able to restore this db with the following

Code: Select all

cd /store/backups/mysql/weekly/nagios
gunzip /store/backups/mysql/weekly/nagios/nagios_week.40.2012-10-06_07h00m.sql.gz
cat /store/backups/mysql/weekly/nagios/nagios_week.40.2012-10-06_07h00m.sql |mysql -pnagiosxi nagios

Re: Services database problem result of no disk space

Posted: Thu Oct 25, 2012 4:45 pm
by bsquadrito
Dude,

You rock! Service performance graphs barely even lost any history. :D (I thought I'd have nothing back to date/time of backup)


Thank you, thank you, thank you,

Brian

Re: Services database problem result of no disk space

Posted: Fri Oct 26, 2012 9:56 am
by scottwilkerson
Glad to here is is resolved...

Just an FYI, we just restored the nagios database, the performance data is stored in RRD files which is why they are still there.

Re: Services database problem result of no disk space

Posted: Tue Oct 30, 2012 2:56 am
by berry1714
That does work. Thanks for your help! ;)