Page 1 of 2
Alert history doesn't work
Posted: Fri Jan 18, 2013 4:27 am
by mcoreso
Hello,
since 1 week, alert history doesn't works the way it should be. I explain :
for the current day, I have normal alerts history listing. When I click on "latest archive", for 1 week ago, I have "No history information was found in this archived log file".
Yesterday I had logs on "current log" but today when I go on earlier archive I have nothing.
For your information, I reloaded Nagios 1 week ago as I usually do.
etc/rc.d/init.d/nagios reload
But since this I had problems with alert history logs.
Need help please.
Thx
Re: Alert history doesn't work
Posted: Tue Jan 22, 2013 3:05 pm
by abrist
Check your nagios log/archives folder to make sure you have historical data:
How was nagios installed? Package repo, source, other?
You may want to check your nagios.cfg for the log file directive:
Re: Alert history doesn't work
Posted: Wed Jan 23, 2013 6:57 am
by mcoreso
abrist wrote:Check your nagios log/archives folder to make sure you have historical data:
How was nagios installed? Package repo, source, other?
You may want to check your nagios.cfg for the log file directive:
I think Nagios was installed in source mode.
Nagios.log is here /var/nagios/nagios.log I had a nagios.lock too
Nagios's logs archives are in /var/nagio/archives I had all logs but files contains only 20 lines approximately.
Before the problems, these files contains more thant 100 lines each days.
Re: Alert history doesn't work
Posted: Wed Jan 23, 2013 6:06 pm
by abrist
Couple of things: /usr/local/nagios is the default install location for source installs, so your version is probably from a repo. You should still be able to view those older logs even though they are less full than usual. You may want to check that you don't have 2 processes running.
Code: Select all
/etc/rc.d/init.d/nagios stop
killall nagios
/etc/rc.d/init.d/nagios start
Re: Alert history doesn't work
Posted: Thu Jan 24, 2013 2:20 am
by mcoreso
Hi,
I found the problem : Nagios was launched 4 times in processes... I do a killall nagios and all works now.
You find the good solution too, thank you for your support
Now, alerts history logs works fine

Re: Alert history doesn't work
Posted: Thu Jan 24, 2013 10:45 am
by slansing
Excellent! Thanks for letting us know

Re: Alert history doesn't work
Posted: Tue Mar 15, 2016 6:17 am
by rohithroki
Hi ,
I am also facing the same issue.
Tried Killing the multiple nagios process still i have the same issue.
Can't view the alert history for the previous day.However i am able to view all the Alert history for the current day.
Also the path /usr/local/nagios/var/archives has all the archive logs for the previous day but still cant view the same in Alert history in Nagios.
quick help will be much appreciated.
regards,
RK
Re: Alert history doesn't work
Posted: Tue Mar 15, 2016 8:37 am
by rohithroki
when I checked the logs in /usr/local/nagios/var/Nagios.log I am getting the below error
nagios: ndomod: Still unable to connect to data sink. 587035 items lost, 5000 queued items to flush
Does it have any relation to the issue I am facing
Thanks
RK
Re: Alert history doesn't work
Posted: Tue Mar 15, 2016 7:26 pm
by Box293
Try:
Code: Select all
service nagios stop
killall -9 nagios
service ndo2db stop
killall -9 ndo2db
rm -f /usr/local/nagios/var/ndo.sock
service ndo2db start
for i in `ipcs -q | grep nagios |awk '{print $2}'`; do ipcrm -q $i; done
service nagios start
After Nagios has started, please run this command:
ipcs -q
It should only show one nagios queue.
Re: Alert history doesn't work
Posted: Tue Mar 15, 2016 11:21 pm
by rohithroki
Thank you for the reply.
How ever wen i try to stop the ndo2db service.I am getting the below error
ndo2db:unrecognized service
Also i cant see the file ndo.sock in the path /usr/local/nagios/var
Regards
RK