Adding upstream version 1.34.4.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
e393c3af3f
commit
4978089aab
4963 changed files with 677545 additions and 0 deletions
1
plugins/parsers/json_v2/testdata/mix_field_and_object/expected.out
vendored
Normal file
1
plugins/parsers/json_v2/testdata/mix_field_and_object/expected.out
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
openweather,id=2.643743e+06,name=London coord_lat=51.5085,coord_lon=-0.1257,description="few clouds",main_temp=12.54,summary="Clouds",wind_speed=2.11 1628186541000000000
|
44
plugins/parsers/json_v2/testdata/mix_field_and_object/input.json
vendored
Normal file
44
plugins/parsers/json_v2/testdata/mix_field_and_object/input.json
vendored
Normal file
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
"coord": {
|
||||
"lon": -0.1257,
|
||||
"lat": 51.5085
|
||||
},
|
||||
"weather": [
|
||||
{
|
||||
"id": 801,
|
||||
"main": "Clouds",
|
||||
"description": "few clouds",
|
||||
"icon": "02n"
|
||||
}
|
||||
],
|
||||
"base": "stations",
|
||||
"main": {
|
||||
"temp": 12.54,
|
||||
"feels_like": 11.86,
|
||||
"temp_min": 10.49,
|
||||
"temp_max": 14.27,
|
||||
"pressure": 1024,
|
||||
"humidity": 77
|
||||
},
|
||||
"visibility": 10000,
|
||||
"wind": {
|
||||
"speed": 2.11,
|
||||
"deg": 254,
|
||||
"gust": 4.63
|
||||
},
|
||||
"clouds": {
|
||||
"all": 21
|
||||
},
|
||||
"dt": 1633545358,
|
||||
"sys": {
|
||||
"type": 2,
|
||||
"id": 2019646,
|
||||
"country": "GB",
|
||||
"sunrise": 1633500560,
|
||||
"sunset": 1633541256
|
||||
},
|
||||
"timezone": 3600,
|
||||
"id": 2643743,
|
||||
"name": "London",
|
||||
"cod": 200
|
||||
}
|
15
plugins/parsers/json_v2/testdata/mix_field_and_object/telegraf.conf
vendored
Normal file
15
plugins/parsers/json_v2/testdata/mix_field_and_object/telegraf.conf
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
[[inputs.file]]
|
||||
files = ["./testdata/mix_field_and_object/input.json"]
|
||||
data_format = "json_v2"
|
||||
[[inputs.file.json_v2]]
|
||||
measurement_name = "openweather"
|
||||
[[inputs.file.json_v2.field]]
|
||||
path = "weather.#.main"
|
||||
rename = "summary"
|
||||
[[inputs.file.json_v2.field]]
|
||||
path = "weather.#.description"
|
||||
[[inputs.file.json_v2.object]]
|
||||
path = "@this"
|
||||
included_keys = ["coord_lat", "coord_lon", "main_temp", "wind_speed"] # List of JSON keys (for a nested key, prepend the parent keys with underscores) that should be only included in result
|
||||
tags = ["id", "name"] # List of JSON keys (for a nested key, prepend the parent keys with underscores) to be a tag instead of a field
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue