feat: add environment variable support and update README instructions

This commit is contained in:
2025-02-05 16:16:57 +01:00
parent 6a7d4e922b
commit fb765920b4
7 changed files with 38 additions and 10 deletions

View File

@@ -1,3 +1,7 @@
[agent]
hostname = "${HOSTNAME}"
omit_hostname = false
[[processors.dedup]]
dedup_interval = "600s"
@@ -14,8 +18,7 @@
[inputs.socket_listener.xpath.tags]
url = "url"
session = "session"
#id = ??
#state = ??
host = "host"
[inputs.socket_listener.xpath.fields]
player = "player"
@@ -26,8 +29,6 @@
data_format = "json"
[[outputs.mongodb]]
dsn = "mongodb://stats_user:%40z%5EVFhN7q%25vzit@192.168.86.120:27017/?authSource=statistics"
database = "statistics"
granularity = "seconds"
# docker run --rm -v .\peertube\statnerd\telegraf.conf:/etc/telegraf/telegraf.conf:ro -p 8094:8094/udp telegraf
dsn = "${DSN}"
database = "${DATABASE}"
granularity = "seconds"