-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: incorrect handling of json_v2 timestamp_path (#10618)
(cherry picked from commit 25e8b45)
- Loading branch information
1 parent
84d0161
commit 94543b3
Showing
4 changed files
with
15 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
1 change: 1 addition & 0 deletions
1
plugins/parsers/json_v2/testdata/timestamp_rfc3339/expected.out
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
file f="value" 1644434944000000000 |
4 changes: 4 additions & 0 deletions
4
plugins/parsers/json_v2/testdata/timestamp_rfc3339/input.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"when": "2022-02-09T19:29:04Z", | ||
"f": "value" | ||
} |
8 changes: 8 additions & 0 deletions
8
plugins/parsers/json_v2/testdata/timestamp_rfc3339/telegraf.conf
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[[inputs.file]] | ||
files = ["./testdata/timestamp_rfc3339/input.json"] | ||
data_format = "json_v2" | ||
[[inputs.file.json_v2]] | ||
timestamp_path = "when" | ||
timestamp_format = "rfc3339" | ||
[[inputs.file.json_v2.field]] | ||
path = "f" |