Nagios Logrotation removing notification on rotated files
-
jose-martins
- Posts: 6
- Joined: Tue Dec 18, 2012 6:48 am
Nagios Logrotation removing notification on rotated files
Hello all.
I've been using Nagios on my corporation with great success.
But there's a behavior on logrotation that I not quite understand.
Logrotation is enabled, but no notifications are kept on rotated files.
log_file=/opt/nagios/nagios/var/nagios.log
log_rotation_method=d
log_archive_path=/opt/nagios/nagios/var/archives
For the current day (viewing the log_file), I get all notifications sent.
For any history (pressing the back red arrow), I always get the "No notifications have been recorded in this archived log file".
Any help solving/debugging, would be appreciated.
I've been using Nagios on my corporation with great success.
But there's a behavior on logrotation that I not quite understand.
Logrotation is enabled, but no notifications are kept on rotated files.
log_file=/opt/nagios/nagios/var/nagios.log
log_rotation_method=d
log_archive_path=/opt/nagios/nagios/var/archives
For the current day (viewing the log_file), I get all notifications sent.
For any history (pressing the back red arrow), I always get the "No notifications have been recorded in this archived log file".
Any help solving/debugging, would be appreciated.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Nagios Logrotation removing notification on rotated file
Are you using the standard Logrotate tool?
-
jose-martins
- Posts: 6
- Joined: Tue Dec 18, 2012 6:48 am
Re: Nagios Logrotation removing notification on rotated file
I'm using Nagios logrotate method, didn't change anything.
How do I even debug such behaviour? Is there any "flag"/anything I can do to see logrotation steps and try and debug why is it not rotating some lines?
How do I even debug such behaviour? Is there any "flag"/anything I can do to see logrotation steps and try and debug why is it not rotating some lines?
Re: Nagios Logrotation removing notification on rotated file
Are your logs being rotated correctly? Check the archives:
If they are there, tail one to make sure they are readable.
Code: Select all
ls -la /opt/nagios/nagios/var/archivesFormer 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.
-
jose-martins
- Posts: 6
- Joined: Tue Dec 18, 2012 6:48 am
Re: Nagios Logrotation removing notification on rotated file
They are there, and readable.
But they "lost" some information. As if they where filtered when they where rotated.
But they "lost" some information. As if they where filtered when they where rotated.
Re: Nagios Logrotation removing notification on rotated file
hmmm. Never heard of that. What type of information is missing from the archived logs?
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.
-
jose-martins
- Posts: 6
- Joined: Tue Dec 18, 2012 6:48 am
Re: Nagios Logrotation removing notification on rotated file
Notifications, for example.
Re: Nagios Logrotation removing notification on rotated file
Alright. Are there any notifications logged in the current nagios.log file? Or are the notification logs missing from that file as well?
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.
-
jose-martins
- Posts: 6
- Joined: Tue Dec 18, 2012 6:48 am
Re: Nagios Logrotation removing notification on rotated file
Nope. The current file is all OK. Only the rotated logs are missing the notifications.
Re: Nagios Logrotation removing notification on rotated file
Run the following command and post the results in a code wrap. We are going to check logging options in nagios.cfg
Code: Select all
$ cd [path to nagios.cfg dir]
$ cat nagios.cfg | grep logFormer 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.