1
0
Fork 0
telegraf/plugins/parsers/xpath/testcases/cbor_hex_encoding/telegraf.conf
Daniel Baumann 4978089aab
Adding upstream version 1.34.4.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-05-24 07:26:29 +02:00

24 lines
581 B
Text

# Example data:
# [
# {
# "str_a": bytearray("this is a test"),
# "str_b": bytearray("foobar"),
# "bytes_a": bytearray([0, 1, 2, 3, 4, 5, 6, 7]),
# "bytes_b": bytearray("foobar"),
# "timestamp": 1687852514
# }
# ]
[[inputs.file]]
files = ["./testcases/cbor_hex_encoding/data.bin"]
data_format = "xpath_cbor"
xpath_native_types = true
[[inputs.file.xpath]]
metric_name = "'data'"
metric_selection = "child::*"
timestamp = "timestamp"
timestamp_format = "unix"
field_selection = "child::*"
fields_bytes_as_hex = ["bytes_*"]