Navigation Menu

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

Add option to disable timestamp adjustment in grok parser #5488

Merged
merged 2 commits into from Feb 27, 2019

Conversation

glinton
Copy link
Contributor

@glinton glinton commented Feb 26, 2019

Resolves #5394 by adding disable_time_mod option to grok parser.

@glinton glinton added this to the 1.10.0 milestone Feb 26, 2019
@danielnelson
Copy link
Contributor

Let's call the option grok_unique_timestamp with possible values "auto" and "disable", to leave us open to further options, default is "auto". This code won't work as it is, you need to hook up the options in registry.go and config.go.

@@ -358,6 +365,10 @@ func (p *Parser) ParseLine(line string) (telegraf.Metric, error) {
return nil, fmt.Errorf("grok: must have one or more fields")
}

if p.UniqueTimestamp != "auto" {
return metric.New(p.Measurement, tags, fields, timestamp)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is backwards, isn't it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind, not equals

@danielnelson danielnelson merged commit 8561788 into master Feb 27, 2019
@danielnelson danielnelson deleted the bugfix/5394 branch February 27, 2019 01:36
otherpirate pushed a commit to otherpirate/telegraf that referenced this pull request Mar 15, 2019
otherpirate pushed a commit to otherpirate/telegraf that referenced this pull request Mar 15, 2019
dupondje pushed a commit to dupondje/telegraf that referenced this pull request Apr 22, 2019
bitcharmer pushed a commit to bitcharmer/telegraf that referenced this pull request Oct 18, 2019
athoune pushed a commit to bearstech/telegraf that referenced this pull request Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants