Refactor telegraf.conf by cleaning up commented sections and updating xpath configuration
This commit is contained in:
@@ -13,58 +13,13 @@
|
|||||||
|
|
||||||
[inputs.socket_listener.xpath.tags]
|
[inputs.socket_listener.xpath.tags]
|
||||||
url = "url"
|
url = "url"
|
||||||
#id = "''"
|
#id = ??
|
||||||
#state = "'connected'"
|
#state = ??
|
||||||
|
|
||||||
[inputs.socket_listener.xpath.fields]
|
[inputs.socket_listener.xpath.fields]
|
||||||
player = "player"
|
player = "player"
|
||||||
#peerValues = "concat('[', string-join(peers/*, ','), ']')"
|
|
||||||
peers = "peers"
|
peers = "peers"
|
||||||
|
|
||||||
#[[inputs.http_listener_v2]]
|
|
||||||
# service_address = ":9091"
|
|
||||||
# paths = ["/webrtc-internals-exporter"]
|
|
||||||
# data_format = "json_v2"
|
|
||||||
# methods = ["POST"]
|
|
||||||
# http_success_code = 204
|
|
||||||
#
|
|
||||||
# [[inputs.http_listener_v2.json_v2]]
|
|
||||||
# measurement_name = "stats"
|
|
||||||
# timestamp_path = "@this.0.values.0.timestamp"
|
|
||||||
# timestamp_format = "unix_ms"
|
|
||||||
#
|
|
||||||
# [[inputs.http_listener_v2.json_v2.object]]
|
|
||||||
# path = "@this"
|
|
||||||
# tags = ["id", "url", "state"]
|
|
||||||
|
|
||||||
[[inputs.http_listener_v2]]
|
|
||||||
service_address = ":9091"
|
|
||||||
paths = ["/webrtc-internals-exporter"]
|
|
||||||
methods = ["POST"]
|
|
||||||
http_success_code = 204
|
|
||||||
data_format = "xpath_json"
|
|
||||||
|
|
||||||
[[inputs.http_listener_v2.xpath]]
|
|
||||||
metric_name = "'statistics'"
|
|
||||||
metric_selection = "/*"
|
|
||||||
|
|
||||||
field_selection = "values/*"
|
|
||||||
field_name = "type"
|
|
||||||
field_value = "."
|
|
||||||
|
|
||||||
timestamp = "/*/values[last()]/*/timestamp"
|
|
||||||
timestamp_format = "unix_ms"
|
|
||||||
|
|
||||||
[inputs.http_listener_v2.xpath.tags]
|
|
||||||
url = "url"
|
|
||||||
state = "state"
|
|
||||||
id = "''"
|
|
||||||
|
|
||||||
[inputs.http_listener_v2.xpath.fields]
|
|
||||||
#values = "values/*"
|
|
||||||
peerConnectionId = "id"
|
|
||||||
peerValues = "concat('[', string-join(values/*, ','), ']')"
|
|
||||||
|
|
||||||
[[outputs.file]]
|
[[outputs.file]]
|
||||||
files = ["stdout"]
|
files = ["stdout"]
|
||||||
data_format = "json"
|
data_format = "json"
|
||||||
|
Reference in New Issue
Block a user