In this video I use Docker-Compos to set up a Tig stack (Telegraf, InfluxDB, and Grafana)
(See download docker-compose.txt for docker-compose.yml because spacing is off on the below.)
$ cat docker-compose.yml
version: “2”
services:
influxdb:
container_name: influxdb
image: influxdb:latest
ports:
– “8086:8086”
user: “1000”
volumes:
– /home/nathan/tig_fun/tig-stack/volumes/influxdb:/var/lib/influxdb
restart: always
grafana:
container_name: grafana
image: grafana/grafana:latest
ports:
– “3000:3000”
environment:
GF_SECURITY_ADMIN_PASSWORD: “secure”
GF_PATHS_DATA: “/var/lib/grafana”
GF_PATHS_LOGS: “/var/log/grafana”
user: “1000”
volumes:
– /home/nathan/tig_fun/tig-stack/volumes/grafana:/var/lib/grafana
– /home/nathan/tig_fun/tig-stack/volumes/grafana/plugins:/var/lib/grafana/plugins
– /home/nathan/tig_fun/tig-stack/logs/grafana:/var/log/grafana
– /home/nathan/tig_fun/tig-stack/conf/grafana_custom.ini,target=/etc/grafana/grafana.ini
links:
– influxdb
restart: always
telegraf:
container_name: telegraf
image: telegraf:latest
network_mode: “host”
user: “1000”
volumes:
– /home/nathan/tig_fun/tig-stack/conf/telegraf.conf:/etc/telegraf/telegraf.conf
– /var/run/docker.sock:/var/run/docker.sock
restart: always
conf/telegraf.conf can be found at https://raw.githubusercontent.com/influxdata/telegraf/master/etc/telegraf.conf
conf/grafana_custom.ini can be fond at https://raw.githubusercontent.com/grafana/grafana/master/conf/defaults.ini