Skip to content

Instantly share code, notes, and snippets.

@lucassardois
Created November 23, 2020 15:06
Show Gist options
  • Save lucassardois/d1158eb435223a756cbe667988e5c312 to your computer and use it in GitHub Desktop.
Save lucassardois/d1158eb435223a756cbe667988e5c312 to your computer and use it in GitHub Desktop.
medium-iot-data-handling
version: "3.8"
services:
mosquitto:
image: eclipse-mosquitto:latest
restart: always
ports:
- "1883:1883"
- "9001:9001"
networks:
- iot
influxdb:
image: influxdb
restart: always
ports:
- "8086:8086"
networks:
- iot
volumes:
- influxdb-data:/var/lib/influxdb
telegraf:
image: telegraf
restart: always
volumes:
- ./telegraf.conf:/etc/telegraf/telegraf.conf:ro
depends_on:
- mosquitto
- influxdb
networks:
- iot
grafana:
image: grafana/grafana
restart: always
ports:
- "3000:3000"
networks:
- iot
volumes:
- grafana-data:/var/lib/grafana
depends_on:
- influxdb
networks:
iot:
volumes:
influxdb-data:
grafana-data:
[[outputs.influxdb]]
urls = ["http://influxdb:8086"]
[[outputs.file]]
files = ["stdout", "/tmp/metrics.out"]
[[inputs.mqtt_consumer]]
servers = ["tcp://mosquitto:1883"]
topics = [
"bedroom/#"
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment