Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timezone of Kibana log #8488

Closed
masaruh opened this issue Sep 28, 2016 · 5 comments
Closed

Timezone of Kibana log #8488

masaruh opened this issue Sep 28, 2016 · 5 comments
Assignees
Labels
bug Fixes for quality problems that affect the customer experience good first issue low hanging fruit v5.0.0

Comments

@masaruh
Copy link

masaruh commented Sep 28, 2016

Kibana version:
4.5.x

Description of the problem including expected versus actual behavior:
When kibana logs to stdout(logging.dest: stdout), it uses local time. When it logs to file(logging.dest: /path/to/logfile), it uses UTC.
Should it use the same timezone?

@spalger spalger added bug Fixes for quality problems that affect the customer experience P3 good first issue low hanging fruit labels Oct 4, 2016
@epixa
Copy link
Contributor

epixa commented Oct 4, 2016

In terms of which timezone gets used (local vs UTC), we should standardize around the behavior that is currently used by Elasticsearch.

@kobelb kobelb self-assigned this Oct 4, 2016
@epixa
Copy link
Contributor

epixa commented Oct 4, 2016

That'd be nice, yeah.

On Tue, Oct 4, 2016 at 10:46 AM, Brandon Kobel [email protected]
wrote:

It appears that Elasticsearch is using UTC even when logging to stdout.

Should we consider making the date format match Elasticsearch as well?
Here's an example of a date from ES: [2016-10-04T10:43:55,370]


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#8488 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADSNjB8pxxmXoDL5OSPJLDqE9HFkQBHks5qwmavgaJpZM4KIeNO
.

@kobelb
Copy link
Contributor

kobelb commented Oct 4, 2016

I misspoke earlier when I said that it was using UTC. I was looking at the logs from Elasticsearch running in a Docker container, and it appears the timezone for the container was set to UTC, misleading me.

TLDR; Elasticsearch appears to by default use the local timezone for stdout logs and their rolling file logs. Should we consider changing our files logs to no longer use UTC?

Elasticsearch is using Log4j, and the pattern itself is configurable for the Console/File appenders. The default date layout for the appenders is %d{ISO8601} which appears to use the java.util.TimeZone.getDefault() method which generally returns the local timezone; however, according to the java docs: The source of the default TimeZone may vary with implementation.

@epixa
Copy link
Contributor

epixa commented Oct 4, 2016

@kobelb Let's do UTC all around. No surprises there, and we don't introduce a change to file log formats.

@kobelb
Copy link
Contributor

kobelb commented Oct 4, 2016

Seems reasonable to me! I will make it so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience good first issue low hanging fruit v5.0.0
Projects
None yet
Development

No branches or pull requests

5 participants