configure telegraf

This commit is contained in:
2025-10-12 16:03:53 +02:00
parent 8c133d81e0
commit 31745df9ff
2 changed files with 151 additions and 0 deletions

18
compose.telegraf.yaml Normal file
View File

@@ -0,0 +1,18 @@
services:
telegraf:
container_name: telegraf
image: telegraf:1.36.2
restart: unless-stopped
environment:
- TELEGRAF_DEBUG=true
- MQTT_USER=${TELEGRAF_MQTT_USER}
- MQTT_PASS=${TELEGRAF_MQTT_PASS}
- DATABASE_HOST=${TELEGRAF_DATABASE_HOST}
- DATABASE_PORT=${TELEGRAF_DATABASE_PORT}
- DATABASE_USER=${TELEGRAF_DATABASE_USER}
- DATABASE_PASS=${TELEGRAF_DATABASE_PASS}
- DATABASE_NAME=${TELEGRAF_DATABASE_NAME}
extra_hosts:
- host:192.168.2.200
volumes:
- /opt/telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro