nagios_logentries

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
twigg0
Posts: 20
Joined: Thu May 10, 2012 7:55 am

nagios_logentries

Post by twigg0 »

Hi all,
a week ago we have a serious problem with Nagios XI (Nagios XI 2012R1.6). For a network problem Nagios was isolated for 3 hours. After that when we returned online, it's completely blocked. We have seen many files in /tmp called checkxxxx. We have stopped nagios e moving files in other directory and then restarted nagios.
Everything goes well except event log. I can't see nothing in Event Log...

What can I do? I have this error on Nagios machine typing cat /var/log/messages. Do I need to repair database? How?

Jul 5 14:21:35 localhost ndo2db: mysql_error: 'Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed'
Jul 5 14:21:41 localhost nagios: SERVICE ALERT: xxxx;Hardware;OK;SOFT;2;OK - System: '', S/N: '', ROM: '', hardware working fine
Jul 5 14:21:41 localhost ndo2db: Error: mysql_query() failed for 'INSERT INTO nagios_logentries SET instance_id='1', logentry_time=FROM_UNIXTIME(1373026901), entry_time=FROM_UNIXTIME(1373026901), entry_time_usec='245593', logentry_type='8192', logentry_data='SERVICE ALERT: sdbportalgntrm1;Hardware;OK;SOFT;2;OK - System: \'\', S/N: \'\', ROM: \'\', hardware working fine', realtime_data='1', inferred_data_extracted='1''
Jul 5 14:21:41 localhost ndo2db: mysql_error: 'Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed'
Jul 5 14:22:11 localhost nagios: SERVICE ALERT: xxxx;Hardware;OK;SOFT;2;OK - System: '', S/N: '', ROM: '', hardware working fine
Jul 5 14:22:11 localhost ndo2db: Error: mysql_query() failed for 'INSERT INTO nagios_logentries SET instance_id='1', logentry_time=FROM_UNIXTIME(1373026931), entry_time=FROM_UNIXTIME(1373026931), entry_time_usec='198510', logentry_type='8192', logentry_data='SERVICE ALERT: sdbsecrm01;Hardware;OK;SOFT;2;OK - System: \'\', S/N: \'\', ROM: \'\', hardware working fine', realtime_data='1', inferred_data_extracted='1''
Jul 5 14:22:11 localhost ndo2db: mysql_error: 'Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed'

Thanks in advance
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: nagios_logentries

Post by slansing »

Lets run through a gamut of checks/fixes here as you probably sustained database corruption amongst other things. Lets start with this:

Code: Select all

service nagios restart

service postgresql restart

service ndo2db restart
Next, please run through the following guidelines to resolve the MySql corruption:

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

After you have done this, please re-check the interface. If it is still displaying issues please post the following log files:

Code: Select all

tail -50 /usr/local/nagios/var/nagios.log

tail -50 /var/log/mysql.log
twigg0
Posts: 20
Joined: Thu May 10, 2012 7:55 am

Re: nagios_logentries

Post by twigg0 »

I have an error restarting ndo2db, no problem restarting nagios and postgres...
What can I do?

[root@snagxi01 ~]# service ndo2db restart
Stopping ndo2db: head: cannot open `/usr/local/nagios/var/ndo2db.lock' for reading: No such file or directory
done.
Starting ndo2db: done.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: nagios_logentries

Post by slansing »

Was ndo running when you ran this command? It does not look like there was a .lock file. How does the messages log look now?
twigg0
Posts: 20
Joined: Thu May 10, 2012 7:55 am

Re: nagios_logentries

Post by twigg0 »

Hi,
after applyng nagios KB to repair Mysql corruption everything seems ok....
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: nagios_logentries

Post by abrist »

Great. Enjoy the week.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked