# Example for explicitly selecting fields from a bunch of selected metrics.
#
# File:
#   testcases/multisensor.xml
#
# Expected Output:
# sensors,name=Facility\ A consumers=3i,frequency=49.78,power=123.4,temperature=20,ok=true 1596294243000000000
# sensors,name=Facility\ B consumers=1i,frequency=49.78,power=14.3,temperature=23.1,ok=true 1596294243000000000
# sensors,name=Facility\ C consumers=0i,frequency=49.78,power=0.02,temperature=19.7,ok=false 1596294243000000000
#

metric_selection = "/Bus/child::Sensor"
metric_name = "string('sensors')"

timestamp = "/Gateway/Timestamp"
timestamp_format = "2006-01-02T15:04:05Z"

[tags]
  name = "substring-after(@name, ' ')"

[fields_int]
  consumers = "Variable/@consumers"

[fields]
  temperature = "number(Variable/@temperature)"
  power       = "number(Variable/@power)"
  frequency   = "number(Variable/@frequency)"
  ok          = "Mode != 'error'"
