Database Maintenance RED Status Need Help !!!!

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
rambertnala
Posts: 60
Joined: Fri Feb 26, 2016 7:15 am

Database Maintenance RED Status Need Help !!!!

Post by rambertnala »

I need help.

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

Database maintenance

Event Manager
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

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

Post by scottwilkerson »

Can you attach the following 2 files

Code: Select all

/usr/local/nagiosxi/var/eventman.log
/usr/local/nagiosxi/var/dbmaint.log
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
rambertnala
Posts: 60
Joined: Fri Feb 26, 2016 7:15 am

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

Post 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
rambertnala
Posts: 60
Joined: Fri Feb 26, 2016 7:15 am

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

Post 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???
rambertnala
Posts: 60
Joined: Fri Feb 26, 2016 7:15 am

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

Post 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???
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

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

Post 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...
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
rambertnala
Posts: 60
Joined: Fri Feb 26, 2016 7:15 am

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

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

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

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
rambertnala
Posts: 60
Joined: Fri Feb 26, 2016 7:15 am

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

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

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

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked