-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.observability.yml
More file actions
138 lines (132 loc) · 4.27 KB
/
docker-compose.observability.yml
File metadata and controls
138 lines (132 loc) · 4.27 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.14.3
container_name: elasticsearch
labels:
- "com.leaky.tokens.logs=true"
environment:
- discovery.type=single-node
- xpack.security.enabled=false
- xpack.security.http.ssl.enabled=false
- xpack.security.transport.ssl.enabled=false
- ES_JAVA_OPTS=-Xms512m -Xmx512m
ports:
- "9200:9200"
volumes:
- elasticsearch_data:/usr/share/elasticsearch/data
healthcheck:
test: ["CMD-SHELL", "exec 3<>/dev/tcp/localhost/9200 && echo -e 'GET / HTTP/1.0\\r\\n\\r\\n' >&3 && timeout 2 cat <&3 | grep -q '200'"]
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
restart: unless-stopped
logstash:
image: docker.elastic.co/logstash/logstash:8.14.3
container_name: logstash
labels:
- "com.leaky.tokens.logs=true"
ports:
- "5044:5044"
volumes:
- ./logstash/config/logstash.yml:/usr/share/logstash/config/logstash.yml
- ./logstash/pipeline:/usr/share/logstash/pipeline
depends_on:
elasticsearch:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "exec 3<>/dev/tcp/localhost/9600 && echo -e 'GET / HTTP/1.0\\r\\n\\r\\n' >&3 && timeout 2 cat <&3 | grep -q '200'"]
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
restart: unless-stopped
kibana:
image: docker.elastic.co/kibana/kibana:8.14.3
container_name: kibana
labels:
- "com.leaky.tokens.logs=true"
environment:
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
ports:
- "5601:5601"
depends_on:
elasticsearch:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "exec 3<>/dev/tcp/localhost/5601 && echo -e 'GET /api/status HTTP/1.0\\r\\n\\r\\n' >&3 && timeout 2 cat <&3 | grep -q '200'"]
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
restart: unless-stopped
prometheus:
image: prom/prometheus:latest
container_name: prometheus
labels:
- "com.leaky.tokens.logs=true"
ports:
- "9090:9090"
volumes:
- ./config-server/src/main/resources/config/prometheus/alert_rules.yml:/etc/prometheus/alert_rules.yml
- ./config-server/src/main/resources/config/prometheus/prometheus-develop.yml:/etc/prometheus/prometheus.yml
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
extra_hosts:
- "host.docker.internal:host-gateway"
healthcheck:
test: ["CMD-SHELL", "exec 3<>/dev/tcp/localhost/9090 && echo -e 'GET /-/healthy HTTP/1.0\\r\\n\\r\\n' >&3 && timeout 2 cat <&3 | grep -q '200'"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
restart: unless-stopped
grafana:
image: grafana/grafana-enterprise
container_name: grafana
labels:
- "com.leaky.tokens.logs=true"
ports:
- "3000:3000"
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_USERS_ALLOW_SIGN_UP=false
volumes:
- grafana_data:/var/lib/grafana
- ./grafana/provisioning:/etc/grafana/provisioning
depends_on:
prometheus:
condition: service_healthy
alertmanager:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "exec 3<>/dev/tcp/localhost/3000 && echo -e 'GET /api/health HTTP/1.0\\r\\n\\r\\n' >&3 && timeout 2 cat <&3 | grep -q '200'"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
restart: unless-stopped
alertmanager:
image: prom/alertmanager:latest
container_name: alertmanager
labels:
- "com.leaky.tokens.logs=true"
ports:
- "9093:9093"
volumes:
- ./config-server/src/main/resources/config/alertmanager/alertmanager.yml:/etc/alertmanager/alertmanager.yml
command:
- '--config.file=/etc/alertmanager/alertmanager.yml'
healthcheck:
test: ["CMD-SHELL", "exec 3<>/dev/tcp/localhost/9093 && echo -e 'GET /-/healthy HTTP/1.0\\r\\n\\r\\n' >&3 && timeout 2 cat <&3 | grep -q '200'"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
restart: unless-stopped
volumes:
elasticsearch_data:
prometheus_data:
grafana_data: