-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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 support for comma in timestamp format #4311
Conversation
@@ -186,6 +186,7 @@ func (p *Parser) Compile() error { | |||
|
|||
// ParseLine is the primary function to process individual lines, returning the metrics | |||
func (p *Parser) ParseLine(line string) (telegraf.Metric, error) { | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Undo these whitespace changes, so that git history will be a little easier to read.
} | ||
|
||
require.NoError(t, p.Compile()) | ||
m, err := p.ParseLine("2018-02-21 13:10:34.555 successfulMatches=1") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should have a comma separator in here right?
@@ -293,6 +294,7 @@ func (p *Parser) ParseLine(line string) (telegraf.Metric, error) { | |||
timestamp = time.Unix(0, iv) | |||
} | |||
case SYSLOG_TIMESTAMP: | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Undo whitespace change.
plugins/inputs/logparser/README.md
Outdated
"reference time", which is `Mon Jan 2 15:04:05 -0700 MST 2006` | ||
"reference time", which is `Mon Jan 2 15:04:05 -0700 MST 2006`. Both a comma | ||
and a period are supported as a number separator. | ||
EX: timestamp:ts-"2006-01-02 15:04:05.000" or timestamp:ts-"2006-01-02 15:04:05,000" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While you can have a comma in the parsed string, in the ts-""
format string it will have to be dot right now unless you replace it in the format string too.
0a3d635
to
5561af3
Compare
closes #3571 |
* origin: (39 commits) Document path tag in tail input Update changelog Added path tag to tail input plugin (influxdata#4292) Run windows tests with -short Fix postfix input handling of multi-level queues (influxdata#4333) Update changelog Add support for comma in logparser timestamp format (influxdata#4311) Update vendoring to dep from gdm (influxdata#4314) Update changelog Add new measurement with results of pgrep lookup to procstat input (influxdata#4307) Update changelog Add valuecounter aggregator plugin (influxdata#3523) Update changelog Update docker input documentation for container status Add container status tag to docker input (influxdata#4259) Drop CI support for Go 1.8 (influxdata#4309) Update changelog Fix selection of tags under nested objects in the JSON parser (influxdata#4284) Update changelog Add owner tag on partitions in burrow input (influxdata#4281) ...
Required for all PRs: