$(data \format\)-01.log files

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.
lethal
Posts: 6
Joined: Wed Oct 29, 2014 2:32 am

Re: $(data \format\)-01.log files

Post by lethal »

I found the reason that nagi tries to find 01 indexed file. That is a bug.

This index indicates hour when logrotation was made.
Some proof:

Code: Select all

Log File Navigation
Sun Oct 26 01:00:00 MSK 2014
to
Mon Oct 27 [color=#FF0000]00[/color]:00:00 MSK 2014

File: /var/log/nagios3/archives/nagios-10-27-2014-[color=#FF0000]00[/color].log

No history information was found for this host in this archived log file
And 26.10.2014

Code: Select all

Log File Navigation
Sat Oct 25 01:00:00 MSK 2014
to
Sun Oct 26 [color=#FF0000]01[/color]:00:00 MSK 2014

File: /var/log/nagios3/archives/nagios-10-26-2014-[color=#FF0000]01[/color].log

Error: Cannot open log file '/var/log/nagios3/archives/nagios-10-26-2014-01.log' for reading!
I live in Moscow and we had to change timezone (was GMT+4 now GMT+3). And that was made exactly 26.10.2014. And from this date till the beginning nagios thinks that log rotation was made at 01:00 AM that's why I have this index on all log files from 26 date.

Is there a solution?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: $(data \format\)-01.log files

Post by abrist »

Is renaming the log files out of the question? (It may skew your data by 1 hour . . . )
How did you change the datetime?
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.
Locked