Page 1 of 1

Wanna see older logs

Posted: Mon Feb 03, 2014 11:39 am
by cesar.garza
Hey people
I was wondering how can i see two dates nagios older log by date and time. Right now i can only see whatever is in there but not able to see older logs. I m using tail command to see the logs.
Please let me know if you know how to see that...
Thanks

Re: Wanna see older logs

Posted: Mon Feb 03, 2014 12:16 pm
by tmcdonald
I'm a little clear about what you need. Are you just running "tail nagios.log"? Are you checking rotated logs?

Re: Wanna see older logs

Posted: Mon Feb 03, 2014 12:22 pm
by cesar.garza
tmcdonald wrote:I'm a little clear about what you need. Are you just running "tail nagios.log"? Are you checking rotated logs?
whenever i wanna see the older log like few hours or minute...i am using this command
tail -1000 nagios.log

but now i wanna see two days older log. I could use this command like tail -1000 nagios.log | grep servicename

Re: Wanna see older logs

Posted: Mon Feb 03, 2014 1:49 pm
by abrist
Nagios rotates logs. Check the archives folder for older logs:

Code: Select all

ls /usr/local/nagios/var/archives/