Skip to content

Instantly share code, notes, and snippets.

@shigeya-dd
Created September 10, 2020 13:17
Show Gist options
  • Save shigeya-dd/a78828669b03cf07b52e65ba2bbbc142 to your computer and use it in GitHub Desktop.
Save shigeya-dd/a78828669b03cf07b52e65ba2bbbc142 to your computer and use it in GitHub Desktop.
version: '3'
services:
nginx0:
image: nginxplus
ports:
- "8080:80"
labels:
- com.datadoghq.ad.check_names=["nginx"]
- com.datadoghq.ad.instances=[{"nginx_status_url":"http://%%host%%:80/api/","use_plus_api":true}]
- com.datadoghq.ad.init_configs=[{}]
- com.datadoghq.ad.logs=[{"source":"nginx","service":"nginx"}]
nginx1:
image: nginxplus
ports:
- "8081:80"
labels:
- com.datadoghq.ad.check_names=["nginx"]
- com.datadoghq.ad.instances=[{"nginx_status_url":"http://%%host%%:80/api/","use_plus_api":true}]
- com.datadoghq.ad.init_configs=[{}]
- com.datadoghq.ad.logs=[{"source":"nginx","service":"nginx"}]
datadog:
image: datadog/agent:latest-jmx
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /proc/:/host/proc/:ro
- /sys/fs/cgroup/:/host/sys/fs/cgroup:ro
environment:
- DD_API_KEY
- 'DD_LOGS_ENABLED=true'
- 'DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL=true'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment