Nagios Event Log
Nagios Event Log
Hello Experts!
Why my Event Log it's empty?
This seems to happened after a NagiosXI restart yesterday, but, after that no event log was recorded.
My first question is how Nagios recorded those logs and the second is how can I overcome this situation?
UPDATE: Even changing Period the result is 0 events
Why my Event Log it's empty?
This seems to happened after a NagiosXI restart yesterday, but, after that no event log was recorded.
My first question is how Nagios recorded those logs and the second is how can I overcome this situation?
UPDATE: Even changing Period the result is 0 events
You do not have the required permissions to view the files attached to this post.
Last edited by lb2cons on Wed Aug 12, 2015 2:47 pm, edited 1 time in total.
Re: Nagios Event Log
Do you see any logs if you click on the "Event Log" link under the "Legacy Reports"?
Do you have any errors/crashed tables in the mysqld.log?
Do you have any errors/crashed tables in the mysqld.log?
Code: Select all
tail -50 /var/log/mysqld.logBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: Nagios Event Log
Yes, the lagacy report it's working fine.
About the MySQL log, yes there are tables crashed:
150812 14:52:06 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed
150812 14:52:06 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed
150812 14:52:06 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed
150812 14:52:21 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed
150812 14:52:21 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed
150812 14:52:26 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed
150812 14:52:26 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed
150812 14:53:35 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed
The first entry about this crash was yesterday at 11:41:
150811 11:41:59 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed
So, the restart crashed this table.
My first question is: Why this happen? Am I restarting NagiosXI correctly?
Restart procedure:
#stop
service gearmand stop
service mod_gearman_worker stop
service nagiosxi stop
service npcd stop
service ndo2db stop
service nagios stop
service postgresql stop
service mysqld stop
service httpd stop
#start
service httpd start
service mysqld start
service postgresql start
service gearmand start
service mod_gearman_worker start
service nagios start
service ndo2db start
service npcd start
service nagiosxi start
The second question is: How can I fix this table? It's possible to restore those records?
About the MySQL log, yes there are tables crashed:
150812 14:52:06 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed
150812 14:52:06 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed
150812 14:52:06 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed
150812 14:52:21 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed
150812 14:52:21 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed
150812 14:52:26 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed
150812 14:52:26 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed
150812 14:53:35 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed
The first entry about this crash was yesterday at 11:41:
150811 11:41:59 [ERROR] /usr/libexec/mysqld: Table './nagios/nagios_logentries' is marked as crashed and last (automatic?) repair failed
So, the restart crashed this table.
My first question is: Why this happen? Am I restarting NagiosXI correctly?
Restart procedure:
#stop
service gearmand stop
service mod_gearman_worker stop
service nagiosxi stop
service npcd stop
service ndo2db stop
service nagios stop
service postgresql stop
service mysqld stop
service httpd stop
#start
service httpd start
service mysqld start
service postgresql start
service gearmand start
service mod_gearman_worker start
service nagios start
service ndo2db start
service npcd start
service nagiosxi start
The second question is: How can I fix this table? It's possible to restore those records?
Re: Nagios Event Log
Did you do it from inside of XI? Under the "Administration" tab, there is a "XI System Component Status" table, with gears you can click on to stop the services nicely.My first question is: Why this happen? Am I restarting NagiosXI correctly?
Can you please try to run this script?The second question is: How can I fix this table? It's possible to restore those records?
Code: Select all
/usr/local/nagiosxi/scripts/repairmysql.sh nagiosThank you.
Former Nagios Employee.
me.
me.
Re: Nagios Event Log
Lets see if repairing the database brings back the exent log. Try this procedure to repair the database.
https://assets.nagios.com/downloads/nag ... tabase.pdf
The Stop procedure looks good but you should start ndo2db before nagios like so.
#start
https://assets.nagios.com/downloads/nag ... tabase.pdf
The Stop procedure looks good but you should start ndo2db before nagios like so.
#start
Code: Select all
service httpd start
service mysqld start
service postgresql start
service gearmand start
service mod_gearman_worker start
service ndo2db start
service nagios start
service npcd start
service nagiosxi startBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: Nagios Event Log
Now my entire environment it's not working!!!!
Check the log please with urgency!!
Check the log please with urgency!!
You do not have the required permissions to view the files attached to this post.
Re: Nagios Event Log
SQL: SQL Error [ndoutils] : Table './nagios/nagios_servicestatus' is marked as crashed and should be repaired SQL: SQL Error [ndoutils] : Table './nagios/nagios_servicestatus' is marked as crashed and should be repaired SQL: SQL Error [ndoutils] : Table './nagios/nagios_servicestatus' is marked as crashed and should be repaired SQL: SQL Error [ndoutils] : Table './nagios/nagios_servicestatus' is marked as crashed and should be repaired SQL: SQL Error [ndoutils] : Table './nagios/nagios_servicestatus' is marked as crashed and should be repaired SQL: SQL Error [ndoutils] : Table './nagios/nagios_servicestatus' is marked as crashed and should be repaired SQL: SQL Error [ndoutils] : Table './nagios/nagios_servicestatus' is marked as crashed and should be repaired
Re: Nagios Event Log
Ok now it's working fine. I've restarted the whole server two or three times. Don't know why this happened and why it's working now.
Even the event log report it's working.
Even the event log report it's working.
Re: Nagios Event Log
Did you follow the guide tgriep posted? His instructions there are better and more complete than the ones I posted.lb2cons wrote:Ok now it's working fine. I've restarted the whole server two or three times. Don't know why this happened and why it's working now.
Even the event log report it's working.
Former Nagios Employee.
me.
me.
Re: Nagios Event Log
No I didn't. I've tried your procedure several times. When I saw tgriep post the Nagios XI was already working fine.
Thanks for your help.
tgriep thanks for your post and for the script mention, I've changed ndo2db start position.
Thanks for your help.
tgriep thanks for your post and for the script mention, I've changed ndo2db start position.