forked from grafana/agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
233 lines (211 loc) · 5.8 KB
/
docker-compose.yaml
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
version: "3"
services:
#
# Core services. These services allow a Grafana Agent to send data somewhere
# and visualize it in Grafana.
#
# Backends: grafana, loki, mimir, tempo
# Example services: avalanche
#
grafana:
image: grafana/grafana:10.0.3
entrypoint:
- /usr/share/grafana/bin/grafana-server
- --homepath=/usr/share/grafana
- --config=/etc/grafana-config/grafana.ini
volumes:
- ./grafana/config:/etc/grafana-config
- ./grafana/datasources:/etc/grafana/provisioning/datasources
- ./grafana/dashboards-provisioning:/etc/grafana/provisioning/dashboards
- ./grafana/dashboards:/var/lib/grafana/dashboards
ports:
- "3000:3000"
loki:
image: grafana/loki:2.8.3
command: -config.file=/etc/loki/local-config.yaml
ports:
- "3100:3100"
mimir:
image: grafana/mimir:2.9.0
volumes:
- ./mimir/config:/etc/mimir-config
entrypoint:
- /bin/mimir
- -config.file=/etc/mimir-config/mimir.yaml
ports:
- "9009:9009"
tempo:
image: grafana/tempo:2.1.0
command:
- "-storage.trace.backend=local" # tell tempo where to permanently put traces
- "-storage.trace.local.path=/tmp/tempo/traces"
- "-storage.trace.wal.path=/tmp/tempo/wal" # tell tempo where to store the wal
- "-auth.enabled=false" # disables the requirement for the X-Scope-OrgID header
- "-server.http-listen-port=3200"
ports:
- "3200:3200"
- "4317:4317"
avalanche:
image: quay.io/freshtracks.io/avalanche:latest
command:
- --metric-count=3000
- --series-interval=3600
- --metric-interval=7200
ports:
- "9001:9001"
hotrod:
profiles: [agent]
image: yurishkuro/microsim:latest
ports:
- "8080:8080"
command:
- "-j=http://agent:14268/api/traces"
- "-d=1h"
depends_on:
- agent
#
# Optional Grafana Agent which can collect telemetry and send it to
# Loki/Mimir/Tempo.
#
# Enable with the "agent" profile.
#
agent:
profiles: [agent]
image: grafana/agent:latest
volumes:
- ./agent/config:/etc/agent-config
entrypoint:
- /bin/grafana-agent
- -server.http.address=0.0.0.0:12345
- -config.file=/etc/agent-config/agent.yaml
- -metrics.wal-directory=/tmp/agent/wal
- -enable-features=integrations-next
- -config.expand-env
- -config.enable-read-api
environment:
HOSTNAME: agent
REMOTE_WRITE_HOST: mimir:9009
LOKI_HOST: loki:3100
TEMPO_HOST: tempo:4317
AVALANCHE_HOST: avalanche:9001
MYSQL_HOST: mysql:3306
POSTGRES_HOST: postgres:5432
REDIS_HOST: redis:6379
DNSMASQ_HOST: dnsmasq:53
MEMCACHED_HOST: memcached:11211
CONSUL_HOST: consul:8500
ELASTICSEARCH_HOST: elasticsearch:9200
KAFKA_HOST: kafka:9093
MONGODB_HOST: mongodb:27017
ports:
- "12345:12345"
depends_on:
- mimir
- loki
- tempo
#
# Integrations. These services act as sample SUOs that you can test
# integrations against.
#
# They are disabled by default. Enable the "integrations" profile to enable
# all of them, or pass an integration by name (i.e., mysql) to enable a
# specific one.
#
mysql:
profiles: [integrations,mysql]
image: mysql/mysql-server:5.7
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
- MYSQL_ROOT_HOST=%
ports:
- 127.0.0.1:3306:3306
postgres:
profiles: [integrations,postgres]
image: postgres:13.0
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
ports:
- 5432:5432
redis:
profiles: [integrations,redis]
image: redis:6
ports:
- "6379:6379"
dnsmasq:
profiles: [integrations,dnsmasq]
image: andyshinn/dnsmasq:2.81
cap_add: [NET_ADMIN]
volumes:
- /tmp/dnsmasq-leases:/var/lib/misc
ports:
- "30053:53/udp"
memcached:
profiles: [integrations,memcached]
image: memcached
ports:
- "11211:11211"
consul:
profiles: [integrations,consul]
image: hashicorp/consul
ports:
- "8500:8500"
elasticsearch:
profiles: [integrations,elasticsearch]
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.1
environment:
- node.name=elasticsearch
- cluster.name=es-grafana-agent-cluster
- discovery.type=single-node
volumes:
- elasticsearch_data:/usr/share/elasticsearch/data
ports:
- "9200:9200"
zookeeper:
profiles: [integrations,zookeeper]
image: wurstmeister/zookeeper:3.4.6
expose:
- "2181"
restart: always
kafka:
profiles: [integrations,kafka]
image: wurstmeister/kafka:2.12-2.3.0
depends_on:
- zookeeper
ports:
- "127.0.0.1:9093:9093"
expose:
- "9092"
- "9094"
environment:
KAFKA_CREATE_TOPICS: "sarama_topic:2:1"
KAFKA_ADVERTISED_LISTENERS: INSIDE://kafka:9092,OUTSIDE://127.0.0.1:9093,DOCKER://kafka:9094
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT,DOCKER:PLAINTEXT
KAFKA_LISTENERS: INSIDE://kafka:9092,OUTSIDE://:9093,DOCKER://kafka:9094
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE
restart: always
kafka-producer:
profiles: [integrations,kafka]
image: gaantunes/kafka-client:latest
depends_on:
- kafka
command:
--producer --kafka.server kafka:9094
restart: always
kafka-consumer:
profiles: [integrations,kafka]
image: gaantunes/kafka-client:latest
depends_on:
- kafka
command:
--consumer --kafka.server kafka:9094
restart: always
mongodb:
profiles: [integrations,mongodb]
image: mongo:4.2
ports:
- "127.0.0.1:27017:27017"
volumes:
elasticsearch_data:
driver: local