Skip to content

Instantly share code, notes, and snippets.

@wreulicke
Created December 19, 2019 09:05
Show Gist options
  • Save wreulicke/e25486494eccff1b47da2fbe5ccb4db9 to your computer and use it in GitHub Desktop.
Save wreulicke/e25486494eccff1b47da2fbe5ccb4db9 to your computer and use it in GitHub Desktop.
version: '3.7'
services:
myapp:
image: myapp
ports:
- "3001:3001"
labels:
com.datadoghq.ad.check_names: '["prometheus"]'
com.datadoghq.ad.init_configs: '[{}]'
com.datadoghq.ad.instances: '[{"prometheus_url": "http://%%host%%:3001/actuator/prometheus", "extra_headers": {"Accept": "text/plain"}, "namespace": "local.test","metrics": ["jvm*"]}]'
datadog:
links:
- myapp
image: datadog/agent:latest
environment:
- DD_API_KEY=<REDACTED>
- DD_TAGS="app:foo-bar-app env:foo-bar-environment"
- DD_AC_EXCLUDE=".*"
- DD_AC_INCLUDE="myapp:.*myapp"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /proc/:/host/proc/:ro
- /sys/fs/cgroup:/host/sys/fs/cgroup:ro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment