-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-datadog.yml
66 lines (65 loc) · 1.97 KB
/
docker-compose-datadog.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
version: "3.9"
services:
statsd-exporter:
extends:
file: docker-compose.yml
service: statsd-exporter
command:
- --statsd.relay.address=datadog-agent:8125
datadog-agent:
image: 'datadog/agent:7.31.1'
environment:
- DD_API_KEY=${DD_API_KEY}
- DD_LOGS_ENABLED=true
- DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL=true
- DD_LOGS_CONFIG_USE_HTTP=true
- DD_CONTAINER_EXCLUDE_LOGS=name:datadog-agent
- DD_PROCESS_AGENT_ENABLED=true
- DD_DOGSTATSD_NON_LOCAL_TRAFFIC=true
ports:
- 8125:8125/udp
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /proc/:/host/proc/:ro
- /sys/fs/cgroup/:/host/sys/fs/cgroup:ro
- type: bind
source: configs/datadog/gunicorn/conf.yaml
target: /etc/datadog-agent/conf.d/gunicorn.d/conf.yaml
- type: volume
source: gunicorn_logs
target: /var/log/gunicorn
read_only: true
myapp:
extends:
file: docker-compose.yml
service: myapp
volumes:
- type: volume
source: gunicorn_logs
target: /var/log/gunicorn
- type: bind
source: ./web/myapp/gunicorn-log-to-disk.conf.py
target: /app/gunicorn.conf.py
db:
extends:
file: docker-compose.yml
service: db
depends_on:
- datadog-agent
labels:
com.datadoghq.ad.check_names: '["mysql"]'
com.datadoghq.ad.init_configs: '[{}]'
com.datadoghq.ad.instances: '[{"host":"%%host%%", "port":3306,"username":"datadog","password":"datadog"}]'
com.datadoghq.ad.logs: '[{"source": "mysql", "service": "db"}]'
mock-elb:
extends:
file: docker-compose.yml
service: mock-elb
labels:
com.datadoghq.ad.check_names: '["nginx"]'
com.datadoghq.ad.init_configs: '[{}]'
com.datadoghq.ad.instances: '[{"nginx_status_url": "http://%%host%%:80/nginx_status/"}]'
com.datadoghq.ad.logs: '[{"source":"nginx","service":"mock-elb"}]'
volumes:
dbdata:
gunicorn_logs: