Last active
August 17, 2020 21:03
-
-
Save DrPsychick/4c2fe19d15bd7ea9c4a1240fceb66c91 to your computer and use it in GitHub Desktop.
Example to run telegraf, influxdb, grafana locally in docker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # using version 2 because of https://docs.docker.com/compose/compose-file/#resources | |
| version: "2.4" | |
| services: | |
| telegraf: | |
| image: drpsychick/telegraf | |
| restart: always | |
| environment: | |
| HOST_PROC: /rootfs/proc | |
| HOST_SYS: /rootfs/sys | |
| HOST_ETC: /rootfs/etc | |
| TEL_AGENT_HOSTNAME: hostname = "myhostname" | |
| TEL_OUTPUTS_INFLUXDB_0: "[[outputs.influxdb]]" | |
| TEL_OUTPUTS_INFLUXDB_URLS: urls = ["http://localhost:8086"] | |
| TEL_INPUTS_KERNEL_0: "[[inputs.kernel]]" | |
| TEL_INPUTS_MEM_0: "[[inputs.mem]]" | |
| TEL_INPUTS_SWAP_0: "[[inputs.swap]]" | |
| TEL_INPUTS_PROCESSES_0: "[[inputs.processes]]" | |
| TEL_INPUTS_SYSTEM_0: "[[inputs.system]]" | |
| TEL_INPUTS_DISK_0: "[[inputs.disk]]" | |
| TEL_INPUTS_DISKIO_0: "[[inputs.diskio]]" | |
| TEL_INPUTS_NET_0: "[[inputs.net]]" | |
| TEL_INPUTS_NETSTAT_0: "[[inputs.netstat]]" | |
| volumes: | |
| - "/proc:/rootfs/proc:ro" | |
| - "/sys:/rootfs/sys:ro" | |
| - "/etc:/rootfs/etc:ro" | |
| - "/var/run/docker.sock:/var/run/docker.sock:ro" | |
| cpu_percent: 1 | |
| mem_limit: 50m | |
| network_mode: "host" | |
| influxdb: | |
| image: drpsychick/influxdb | |
| restart: always | |
| environment: | |
| IFX_GLOBAL: reporting-disabled = true | |
| ports: | |
| - 8086:8086 | |
| - 8089:8089/udp | |
| volumes: | |
| - "influxdb:/var/lib/influxdb" | |
| cpu_percent: 50 | |
| mem_limit: 1g | |
| networks: | |
| - monitoring | |
| grafana: | |
| image: grafana/grafana | |
| restart: always | |
| #environment: | |
| #GF_INSTALL_PLUGINS: # plugins to install | |
| ports: | |
| - 3000:3000 | |
| volumes: | |
| - "grafana:/var/lib/grafana" | |
| cpu_percent: 1 | |
| mem_limit: 200m | |
| networks: | |
| - monitoring | |
| networks: | |
| monitoring: | |
| volumes: | |
| influxdb: | |
| grafana: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment