-
Notifications
You must be signed in to change notification settings - Fork 1
/
compose.fleet.yml
71 lines (69 loc) · 2.22 KB
/
compose.fleet.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
67
68
69
70
71
version: "2.2"
services:
fleet:
depends_on:
esmonitoring01:
condition: service_healthy
kibmonitoring01:
condition: service_healthy
image: docker.elastic.co/beats/elastic-agent:${STACK_VERSION}
networks:
- elk
volumes:
- monitoring_certs:/usr/share/elastic-agent/config/certs
container_name: fleet
ports:
- ${FLEET_PORT}:8220
restart: always
user: root # note, synthetic browser monitors require this set to `elastic-agent`
environment:
- FLEET_SERVER_ENABLE=1
- FLEET_SERVER_CERT=/usr/share/elastic-agent/config/certs/fleet/fleet.crt
- FLEET_SERVER_CERT_KEY=/usr/share/elastic-agent/config/certs/fleet/fleet.key
- FLEET_SERVER_HOST=0.0.0.0
- FLEET_SERVER_PORT=8220
- FLEET_SERVER_POLICY_ID=fleet-server-policy
- FLEET_ENROLL=1
- KIBANA_FLEET_SETUP=1
- KIBANA_FLEET_HOST=https://kibmonitoring01:5601
- ELASTICSEARCH_HOST=https://esmonitoring01:9200
- ELASTICSEARCH_USERNAME=elastic
- ELASTICSEARCH_PASSWORD=${ELASTIC_PASSWORD}
- ELASTICSEARCH_CA=/usr/share/elastic-agent/config/certs/ca/ca.crt
- FLEET_URL=https://fleet:8220
healthcheck:
test:
[
"CMD-SHELL",
"curl -s -I --cacert config/certs/ca/ca.crt https://fleet:8220 | grep -q 'HTTP/2 404'",
]
interval: 10s
timeout: 10s
retries: 120
agent:
image: docker.elastic.co/beats/elastic-agent:${STACK_VERSION}
volumes:
- monitoring_certs:/usr/share/elastic-agent/config/certs
- /var/lib/docker/containers:/var/lib/docker/containers:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
container_name: agent
networks:
- elk
ports:
- ${AGENT_PORT}:8220
restart: always
user: root # note, synthetic browser monitors require this set to `elastic-agent`
environment:
- FLEET_ENROLLMENT_TOKEN=${AGENT_TOKEN}
- FLEET_ENROLL=1
- FLEET_CA=/usr/share/elastic-agent/config/certs/fleet/fleet.crt
- FLEET_URL=https://fleet:8220
healthcheck:
test:
[
"CMD-SHELL",
"curl -s -I http://agent:8220 | grep -q 'HTTP/2 404'",
]
interval: 10s
timeout: 10s
retries: 120