Page 1 of 1

Database Maintenance RED Status Need Help !!!!

Posted: Wed Oct 30, 2019 7:20 am
by rambertnala
I need help.

I am not able to get a solution for 2 susyem status errors

Database maintenance

Event Manager

Re: Database Maintenance RED Status Need Help !!!!

Posted: Wed Oct 30, 2019 8:16 am
by scottwilkerson
Can you attach the following 2 files

Code: Select all

/usr/local/nagiosxi/var/eventman.log
/usr/local/nagiosxi/var/dbmaint.log

Re: Database Maintenance RED Status Need Help !!!!

Posted: Thu Oct 31, 2019 2:35 am
by rambertnala
scottwilkerson wrote:Can you attach the following 2 files

Code: Select all

/usr/local/nagiosxi/var/eventman.log
/usr/local/nagiosxi/var/dbmaint.log
Hi all

I have restored backup successfully. Now i am repairing databases

https://support.nagios.com/forum/viewto ... =6&t=56249

I will check if it has been resolved with that.

If not i will attach them

Thanks

Re: Database Maintenance RED Status Need Help !!!!

Posted: Thu Oct 31, 2019 3:10 am
by rambertnala
These are steps i have done:

Restored Backup 21 October ( How can I restore a snapshot i have downloaded from 29 October????)
Repaired databases

Still RED dot System Status Database Maintenance

Stop CROND
Deleted dbmaint.lock & dbmaint.log
Start CROND

Waiting minutes

OUPUT dbmaint.log

CREATING: /usr/local/nagiosxi/var/dbmaint.lock
CLEANING ndoutils TABLE 'commenthistory'...
SQL: DELETE FROM nagios_commenthistory WHERE entry_time < FROM_UNIXTIME(1540973701)
CLEANING ndoutils TABLE 'processevents'...
SQL: DELETE FROM nagios_processevents WHERE event_time < FROM_UNIXTIME(1540973701)
CLEANING ndoutils TABLE 'externalcommands'...
SQL: DELETE FROM nagios_externalcommands WHERE entry_time < FROM_UNIXTIME(1571904901)
CLEANING ndoutils TABLE 'logentries'...
SQL: DELETE FROM nagios_logentries WHERE logentry_time < FROM_UNIXTIME(1564733701)
CLEANING ndoutils TABLE 'notifications'...
SQL: DELETE FROM nagios_notifications WHERE start_time < FROM_UNIXTIME(1564733701)
CLEANING ndoutils TABLE 'contactnotifications'...
SQL: DELETE FROM nagios_contactnotifications WHERE start_time < FROM_UNIXTIME(1564733701)
CLEANING ndoutils TABLE 'contactnotificationmethods'...
SQL: DELETE FROM nagios_contactnotificationmethods WHERE start_time < FROM_UNIXTIME(1564733701)
CLEANING ndoutils TABLE 'statehistory'...
SQL: DELETE FROM nagios_statehistory WHERE state_time < FROM_UNIXTIME(1556957701)

What can I do???

Re: Database Maintenance RED Status Need Help !!!!

Posted: Thu Oct 31, 2019 3:36 am
by rambertnala
OOooohhhhhhhhhhhh

Surprise Database Maintenance & Event Manager GREEN dot

Thanks

Only need to know how to restore a snapshot.

I have copied file to /usr/local/nagiosxi/nom/checkpoints/nagioscore/archives/

But when i try to restore it says file doesn't exist. Is possible it was cause I dont have .txt file???

Re: Database Maintenance RED Status Need Help !!!!

Posted: Thu Oct 31, 2019 9:26 am
by scottwilkerson
To restore snapshots you would need to copy everything under

Code: Select all

/usr/local/nagiosxi/nom/checkpoints/
They should already be there if you restored a backup...

Re: Database Maintenance RED Status Need Help !!!!

Posted: Thu Oct 31, 2019 10:46 am
by rambertnala
Hi friend.

No it was not there. It was created 29 October and i restored a backup from 21 October.

Local Backup is created Every Monday at 4:00 AM

Backup from 28 October failed, and began problems. So i had to restore a backup from 21 October.

All changes made until 29 October have been lost...

So is possible to restore a snapshot from 29 October ????

Thanks and regards.

Re: Database Maintenance RED Status Need Help !!!!

Posted: Thu Oct 31, 2019 11:13 am
by scottwilkerson
Oh, you would have to copy everything from

Code: Select all

/usr/local/nagiosxi/nom/checkpoints/
to the new server

This is only the configurations however, it will not contain any plugins or users you may have added in that timeframe

Re: Database Maintenance RED Status Need Help !!!!

Posted: Thu Oct 31, 2019 11:38 am
by rambertnala
I have copied snapshot file from 29 October in

/usr/local/nagiosxi/nom/checkpoints/

and

/usr/local/nagiosxi/nom/checkpoints/archives/

I try to restore but i get error

File does not exist

Regards

Re: Database Maintenance RED Status Need Help !!!!

Posted: Thu Oct 31, 2019 11:44 am
by scottwilkerson
Under

Code: Select all

ll /usr/local/nagiosxi/nom/checkpoints/
there are 2 directories nagiosxi & nagioscore

Code: Select all

drwxr-xr-x 4 nagios nagios 4096 Oct 30 16:49 nagioscore
drwxr-xr-x 3 nagios nagios 4096 Oct 30 16:49 nagiosxi
you need to contents of both of these directories moved to the new server with every file in the exact same location as they were on the original server

then for good measure you should run the following to make sure run the following to make sure you didn't change the permissions when you moved the files

Code: Select all

chown nagios:nagios -R /usr/local/nagiosxi/nom/checkpoints
Once you have done all of that, then try the restore