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
nagios_logentries
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: nagios_logentries
Lets run through a gamut of checks/fixes here as you probably sustained database corruption amongst other things. Lets start with this:
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
service nagios restart
service postgresql restart
service ndo2db restarthttp://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.logRe: nagios_logentries
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.
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
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?
Re: nagios_logentries
Hi,
after applyng nagios KB to repair Mysql corruption everything seems ok....
after applyng nagios KB to repair Mysql corruption everything seems ok....
Re: nagios_logentries
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.
"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.