Bug 1347871 - Fluentd needs specific rollover date formatting in /var/log/messages
Summary: Fluentd needs specific rollover date formatting in /var/log/messages
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Logging
Version: 3.2.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: ewolinet
QA Contact: chunchen
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-17 21:58 UTC by Eric Jones
Modified: 2019-12-16 05:57 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: When reading in rolled over log messages into Fluentd, if the rolled over file name wasn't in a specific format Fluentd would fail while processing the date for that record. This was to adjust for a gap where logs from the previous year would be interpreted as logs that take place in the future since there was not a year field on the log records. Consequence: Loss of log records Fix: In addition to container logs, Fluentd will only read in records from /var/log/messages instead /var/log/messages* Result: Fluentd will no longer read in log records from rolled over files.
Clone Of:
Environment:
Last Closed: 2016-09-27 09:38:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1933 0 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.3 Release Advisory 2016-09-27 13:24:36 UTC

Description Eric Jones 2016-06-17 21:58:04 UTC
Description of problem:
In /var/log/messages, fluentD is looking for a rollover date format similar to 'messages-20160613' but if it is anything else it will create errors and will not pass the logs through the system.

Elastic Search Will appear to pass logs along but Fluentd logs will look like the following:
2016-06-17 04:13:00 -0400 [warn]: failed to expand `%Q[#{ Time.at(time) > Time.now ? (temp_time = Time.parse(Time.at(time).to_s.gsub(Time.at(time).year.to_s, (tag_parts[3].nil? ? Time.at(time).year.to_s : tag_parts[3][9,4]) )).to_datetime.to_s; Time.parse(temp_time) > Time.now ? Time.parse(temp_time.gsub(Time.parse(temp_time).year.to_s, (Time.parse(temp_time).year - 1).to_s )).to_datetime.to_s : Time.parse(temp_time).to_datetime.to_s ) : Time.at(time).to_datetime.to_s }]` error_class=TypeError error="no implicit conversion of nil into String"
  2016-06-17 04:13:00 -0400 [warn]: suppressed same stacktrace

Which looks similar to https://bugzilla.redhat.com/show_bug.cgi?id=1347368 but is different because the systems are on GMT timezone.

Comment 3 Paul Weil 2016-08-03 15:27:31 UTC
merged in https://github.com/openshift/origin-aggregated-logging/pull/202.  Moving to modified

Comment 4 Troy Dawson 2016-08-03 19:06:11 UTC
This has been merged and is in OSE v3.3.0.14 or newer.

Comment 7 Troy Dawson 2016-08-03 19:38:09 UTC
I jumped the gun on this.  It hasn't been pulled in yet.  Dropping this back down to Modified.

Comment 11 Xia Zhao 2016-08-11 09:02:31 UTC
Was blocked by https://bugzilla.redhat.com/show_bug.cgi?id=1366137

Comment 12 Xia Zhao 2016-08-19 03:32:02 UTC
blocked by https://bugzilla.redhat.com/show_bug.cgi?id=1368301

Comment 16 errata-xmlrpc 2016-09-27 09:38:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1933


Note You need to log in before you can comment on or make changes to this bug.