-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.monitor.yml
157 lines (146 loc) · 4.17 KB
/
docker-compose.monitor.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
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
version: "3.7"
services:
prometheus:
image: prom/prometheus
container_name: prometheus
volumes:
- ./prometheus/config:/etc/prometheus
command:
- "--config.file=/etc/prometheus/prometheus.yml"
restart: always
ports:
- "9090:9090" # 호스트의 9090 포트와 컨테이너의 9090 포트를 연결
influxdb:
image: bitnami/influxdb:2.7.1
container_name: influxdb
environment:
INFLUXDB_ADMIN_USER_PASSWORD: ${DB_USER_PASSWORD}
INFLUXDB_ADMIN_USER_TOKEN: ${DB_USERNAME}
INFLUXDB_HTTP_AUTH_ENABLED: "false"
INFLUXDB_DB: ${DB_DATABASE}
grafana:
container_name: grafana
image: grafana/grafana:8.2.2
restart: unless-stopped
environment:
GF_INSTALL_PLUGINS: "grafana-clock-panel"
GF_DATABASE_TYPE: "mysql"
GF_DATABASE_HOST: ${DB_HOST}
GF_DATABASE_NAME: ${DB_DATABASE}
GF_DATABASE_USER: ${DB_USERNAME}
GF_DATABASE_PASSWORD: ${DB_USER_PASSWORD}
ports:
- "3050:3000"
volumes:
- ./grafana/grafana.ini:/etc/grafana/grafana.ini:ro
- grafana-data:/var/lib/grafana
logging:
driver: "json-file"
options:
max-size: "8m"
max-file: "10"
node-exporter:
image: prom/node-exporter
container_name: node-exporter
ports:
- "9100:9100" # 호스트의 9100 포트와 컨테이너의 9100 포트를 연결
restart: always
alertmanager:
container_name: alertmanager
image: prom/alertmanager
volumes:
- ./alertmanager/:/etc/alertmanager/
ports:
- "9093:9093"
restart: always
command:
- "--config.file=/etc/alertmanager/config.yml"
- "--storage.path=/alertmanager"
cadvisor:
image: google/cadvisor
container_name: cadvisor
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /var/lib/docker/:/var/lib/docker:ro
- /dev/disk/:/dev/disk:ro
ports:
- "8080:8080" # 호스트의 8080 포트와 컨테이너의 8080 포트를 연결
restart: always
elasticsearch:
container_name: elasticsearch
build:
context: ./logging/elasticsearch
dockerfile: Dockerfile
args:
ELASTIC_VERSION: 8.5.2
volumes:
- ./logging/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro,Z
- elasticsearch:/usr/share/elasticsearch/data:Z
ports:
- "9200:9200"
- "9300:9300"
environment:
node.name: elasticsearch
ES_JAVA_OPTS: -Xms512m -Xmx512m
ELASTIC_PASSWORD: ${DB_ROOT_PASSWORD}
discovery.type: single-node
restart: unless-stopped
logstash:
container_name: logstash
build:
context: ./logging/logstash
dockerfile: Dockerfile
args:
ELASTIC_VERSION: 8.5.2
volumes:
- ./logging/logstash/config/logstash.yml:/usr/share/logstash/config/logstash.yml:ro,Z
- ./logging/logstash/pipeline:/usr/share/logstash/pipeline:ro,Z
ports:
- "5044:5044"
- "50000:50000/tcp"
- "50000:50000/udp"
- "9600:9600"
environment:
LS_JAVA_OPTS: -Xms256m -Xmx256m
LOGSTASH_INTERNAL_PASSWORD: ${DB_ROOT_PASSWORD}
ES_PASSWORD: ${DB_ROOT_PASSWORD}
depends_on:
- elasticsearch
restart: unless-stopped
kibana:
container_name: kibana
build:
context: ./logging/kibana
dockerfile: Dockerfile
args:
ELASTIC_VERSION: 8.5.2
volumes:
- ./logging/kibana/config/kibana.yml:/usr/share/kibana/config/kibana.yml:ro,Z
ports:
- "5601:5601"
environment:
KIBANA_SYSTEM_PASSWORD: ${DB_ROOT_PASSWORD}
depends_on:
- elasticsearch
restart: unless-stopped
filebeat:
container_name: filebeat
build:
context: ./logging/filebeat
dockerfile: Dockerfile
args:
ELASTIC_VERSION: 8.5.2
entrypoint: "filebeat -e -strict.perms=false"
volumes:
- ./logging/filebeat/config/filebeat.yml:/usr/share/filebeat/filebeat.yml
- ./nginx/log:/var/log/nginx # nginx log path (require same option on nginx container)
depends_on:
- logstash
- elasticsearch
- kibana
volumes:
elasticsearch:
grafana-data: {}