====== The TIG Stack ====== //[[.:telegraf|Telegraf]], InfluxDB, Grafana// Not to confuse with the inferior TICK stack (Chronograf/Kapacitor instead of Grafana)! version: '3.3' services: grafana: image: grafana/grafana:7.1.1 container_name: grafana expose: - "3000" volumes: - "./grafana:/var/lib/grafana" restart: always user: "0" networks: - public labels: - "traefik.enable=true" - "traefik.http.services.grafana.loadbalancer.server.port=3000" - "traefik.http.routers.grafana.rule=Host(`mon.example.com`)" - "traefik.http.routers.grafana.tls=true" - "traefik.http.routers.grafana.tls.certResolver=le" env_file: ./env.grafana influxdb: image: influxdb:1.7 container_name: influxdb restart: always expose: - "8086" networks: - public - default volumes: - "./influxdb:/var/lib/influxdb" labels: - "traefik.enable=true" - "traefik.http.services.influxdb.loadbalancer.server.port=8086" - "traefik.http.routers.influxdb.rule=Host(`influx.example.com`)" - "traefik.http.routers.influxdb.tls=true" - "traefik.http.routers.influxdb.tls.certResolver=le" env_file: ./env.influxdb networks: public: external: true ==== Telegraf ==== [[https://portal.influxdata.com/downloads/|Download]] [global_tags] dc = "DATACENTER" client = "CLIENT" [agent] interval = "10s" round_interval = true metric_batch_size = 1000 metric_buffer_limit = 10000 collection_jitter = "1s" flush_interval = "30s" flush_jitter = "1s" precision = "" hostname = "HOSTNAME.EXAMPLE.COM" omit_hostname = false ####################### OUTPUT PLUGINS ########################### [[outputs.influxdb]] urls = ["https://INFLUX.EXAMPLE.COM"] database = "DATABASE" skip_database_creation = true username = "USERNAME" password = "PASSWORD" ######################## INPUT PLUGINS ########################### [[inputs.cpu]] percpu = true totalcpu = true collect_cpu_time = false report_active = false [[inputs.disk]] ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"] [[inputs.diskio]] [[inputs.kernel]] [[inputs.mem]] [[inputs.processes]] [[inputs.swap]] [[inputs.system]] [[inputs.kernel_vmstat]] [[inputs.net]] [[inputs.temp]] ==== InfluxDB ==== [[https://portal.influxdata.com/downloads/|Download]] [[..:influxdb|Configuration]] ==== Grafana ==== Docker: [[https://hub.docker.com/r/grafana/grafana|grafana/grafana]]