You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you use a .field + .object with your JSON parser, it an includes an extra line of the whatever .field or .tag subtables are also configured with the object.
Relevant telegraf.conf:
[[inputs.http]]
urls = [
"https://api.openweathermap.org/data/2.5/weather?q=london&appid=dd0be88fd6d6fa1097a785db9de880b3&units=metric"
]
tagexclude = ["url", "host"]
data_format = "json_v2"
[[inputs.http.json_v2]]
measurement_name = "openweather"
[[inputs.http.json_v2.field]]
path = "weather.#.main"rename = "summary"
[[inputs.http.json_v2.field]]
path = "weather.#.description"
[[inputs.http.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 resulttags = ["id", "name"] # List of JSON keys (for a nested key, prepend the parent keys with underscores) to be a tag instead of a field
[[outputs.file]]
files = ["stdout"]
When you use a
.field
+.object
with your JSON parser, it an includes an extra line of the whatever.field
or.tag
subtables are also configured with the object.Relevant telegraf.conf:
System info:
Telegraf 1.19.2
Expected behavior:
Output:
Actual behavior:
Output
The text was updated successfully, but these errors were encountered: