1
0
Fork 0
telegraf/plugins/parsers/xpath/testcases/multisensor_selection_batch.conf

24 lines
734 B
Text
Raw Normal View History

# Example for batch selecting fields from a bunch of selected metrics.
#
# File:
# testcases/multisensor.xml
#
# Expected Output:
# sensors,name=Facility\ A consumers=3,frequency=49.78,power=123.4,temperature=20 1596294243000000000
# sensors,name=Facility\ B consumers=1,frequency=49.78,power=14.3,temperature=23.1 1596294243000000000
# sensors,name=Facility\ C consumers=0,frequency=49.78,power=0.02,temperature=19.7 1596294243000000000
#
metric_selection = "/Bus/child::Sensor"
metric_name = "string('sensors')"
timestamp = "/Gateway/Timestamp"
timestamp_format = "2006-01-02T15:04:05Z"
field_selection = "child::Variable"
field_name = "name(@*[1])"
field_value = "number(@*[1])"
[tags]
name = "substring-after(@name, ' ')"