From 95babcde15cdcd177ae4d64861a868c0e802000f Mon Sep 17 00:00:00 2001 From: Mirko Milovanovic Date: Sat, 25 Jan 2025 14:41:24 +0100 Subject: [PATCH] Refactor telegraf.conf by cleaning up commented sections and updating xpath configuration --- peertube/statnerd/telegraf.conf | 49 ++------------------------------- 1 file changed, 2 insertions(+), 47 deletions(-) diff --git a/peertube/statnerd/telegraf.conf b/peertube/statnerd/telegraf.conf index 37e5690..6211ca3 100644 --- a/peertube/statnerd/telegraf.conf +++ b/peertube/statnerd/telegraf.conf @@ -13,58 +13,13 @@ [inputs.socket_listener.xpath.tags] url = "url" - #id = "''" - #state = "'connected'" + #id = ?? + #state = ?? [inputs.socket_listener.xpath.fields] player = "player" - #peerValues = "concat('[', string-join(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]] files = ["stdout"] data_format = "json"