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
58
plugins/parsers/json_v2/testdata/nested_objects_optional/telegraf.conf
vendored
Normal file
58
plugins/parsers/json_v2/testdata/nested_objects_optional/telegraf.conf
vendored
Normal file
|
@ -0,0 +1,58 @@
|
|||
# Example taken from: https://github.com/influxdata/telegraf/issues/13990
|
||||
|
||||
# Parse String types from JSON
|
||||
[[inputs.file]]
|
||||
|
||||
files = ["./testdata/nested_objects_optional/nested_objects_single.json", "./testdata/nested_objects_optional/nested_objects_nest.json"]
|
||||
data_format = "json_v2"
|
||||
|
||||
[[inputs.file.json_v2]]
|
||||
timestamp_path = 'timestamp'
|
||||
timestamp_format = 'unix_ms'
|
||||
|
||||
[[inputs.file.json_v2.tag]]
|
||||
path = 'name'
|
||||
optional = true
|
||||
[[inputs.file.json_v2.tag]]
|
||||
path = 'datatype'
|
||||
optional = true
|
||||
[[inputs.file.json_v2.field]]
|
||||
path = 'value'
|
||||
rename = 'value_f'
|
||||
optional = true
|
||||
|
||||
[[inputs.file.json_v2.object]]
|
||||
path = 'metrics.#(datatype=="float")#'
|
||||
optional = true
|
||||
tags = ['datatype']
|
||||
[inputs.file.json_v2.object.renames]
|
||||
value = 'value_f'
|
||||
[inputs.file.json_v2.object.fields]
|
||||
value = 'float'
|
||||
|
||||
[[inputs.file.json_v2.object]]
|
||||
path = 'metrics.#(datatype=="string")#'
|
||||
optional = true
|
||||
tags = ['datatype']
|
||||
[inputs.file.json_v2.object.renames]
|
||||
value = 'value_s'
|
||||
[inputs.file.json_v2.object.fields]
|
||||
value = 'string'
|
||||
|
||||
[[inputs.file.json_v2.object]]
|
||||
path = 'metrics.#(datatype=="int")#'
|
||||
optional = true
|
||||
tags = ['datatype']
|
||||
[inputs.file.json_v2.object.renames]
|
||||
value = 'value_i'
|
||||
[inputs.file.json_v2.object.fields]
|
||||
value = 'int'
|
||||
|
||||
[[inputs.file.json_v2.object]]
|
||||
path = 'metrics.#(datatype=="bool")#'
|
||||
optional = true
|
||||
tags = ['datatype']
|
||||
[inputs.file.json_v2.object.renames]
|
||||
value = 'value_b'
|
||||
[inputs.file.json_v2.object.fields]
|
||||
value = 'bool'
|
Loading…
Add table
Add a link
Reference in a new issue