Alert history doesn't work

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
mcoreso
Posts: 3
Joined: Fri Jan 18, 2013 4:07 am

Alert history doesn't work

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Alert history doesn't work

Post by abrist »

Check your nagios log/archives folder to make sure you have historical data:

Code: Select all

/usr/local/nagios/var/archives
How was nagios installed? Package repo, source, other?

You may want to check your nagios.cfg for the log file directive:

Code: Select all

log_file=<file_name>
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.
mcoreso
Posts: 3
Joined: Fri Jan 18, 2013 4:07 am

Re: Alert history doesn't work

Post by mcoreso »

abrist wrote:Check your nagios log/archives folder to make sure you have historical data:

Code: Select all

/usr/local/nagios/var/archives
How was nagios installed? Package repo, source, other?

You may want to check your nagios.cfg for the log file directive:

Code: Select all

log_file=<file_name>
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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Alert history doesn't work

Post 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
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.
mcoreso
Posts: 3
Joined: Fri Jan 18, 2013 4:07 am

Re: Alert history doesn't work

Post 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 ;)
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Alert history doesn't work

Post by slansing »

Excellent! Thanks for letting us know :)
rohithroki
Posts: 138
Joined: Mon Nov 30, 2015 6:12 am

Re: Alert history doesn't work

Post 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
rohithroki
Posts: 138
Joined: Mon Nov 30, 2015 6:12 am

Re: Alert history doesn't work

Post 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
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Alert history doesn't work

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
rohithroki
Posts: 138
Joined: Mon Nov 30, 2015 6:12 am

Re: Alert history doesn't work

Post 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
Locked