adding timezone support to logparser timestamps#2882
Merged
danielnelson merged 1 commit intoinfluxdata:masterfrom Jun 5, 2017
Merged
adding timezone support to logparser timestamps#2882danielnelson merged 1 commit intoinfluxdata:masterfrom
danielnelson merged 1 commit intoinfluxdata:masterfrom
Conversation
danielnelson
suggested changes
Jun 5, 2017
Contributor
danielnelson
left a comment
There was a problem hiding this comment.
Looks great, just a few tweaks needed.
| ### Configuration: | ||
|
|
||
| ```toml | ||
| [[inputs.logparser]] |
plugins/inputs/logparser/README.md
Outdated
| custom_pattern_files = [] | ||
| ## Custom patterns can also be defined here. Put one pattern per line. | ||
|
|
||
| ## Custom patterns can also be defined here. Put one pattern per line. |
Contributor
There was a problem hiding this comment.
Use 2 space indention in here
|
|
||
| p.loc, err = time.LoadLocation(p.Timezone) | ||
| if err != nil { | ||
| log.Printf("D! improper timezone supplied (%s), setting loc to UTC", p.Timezone) |
| ## 1. Local -- interpret based on machine localtime | ||
| ## 2. "Canada/Eastern" -- Unix TZ values like those found in https://en.wikipedia.org/wiki/List_of_tz_database_time_zones | ||
| ## 3. UTC -- or blank/unspecified, will return timestamp in UTC | ||
| timezone = "Canada/Eastern" |
Contributor
Author
|
Updated with requested changes. Apologies for the whitespace issues, new vimrc config :/ |
jeichorn
pushed a commit
to jeichorn/telegraf
that referenced
this pull request
Jul 24, 2017
MrMaxBuilds
pushed a commit
that referenced
this pull request
Jun 26, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.