-
Notifications
You must be signed in to change notification settings - Fork 344
/
Copy pathdocker-compose-standalone.yml
326 lines (316 loc) · 9.95 KB
/
docker-compose-standalone.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
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
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
# Copyright (c) 2019 Battelle Energy Alliance, LLC. All rights reserved.
version: '3.7'
################################################################################
# Commonly tweaked configuration options
#-------------------------------------------------------------------------------
x-moloch-variables: &moloch-variables
MANAGE_PCAP_FILES : 'false'
ZEEK_AUTO_ANALYZE_PCAP_FILES : 'true'
MOLOCH_ANALYZE_PCAP_THREADS : 1
ZEEK_AUTO_ANALYZE_PCAP_THREADS : 1
x-logstash-variables: &logstash-variables
# experimental java execution engine (https://www.elastic.co/blog/meet-the-new-logstash-java-execution-engine)
LOGSTASH_JAVA_EXECUTION_ENGINE : 'true'
LOGSTASH_OUI_LOOKUP : 'true'
LOGSTASH_REVERSE_DNS : 'false'
# ES_EXTERNAL_HOSTS : '10.0.0.123:9200'
# ES_EXTERNAL_SSL : 'true'
# ES_EXTERNAL_SSL_CERTIFICATE_VERIFICATION : 'false'
# For security, ES_EXTERNAL_USER and ES_EXTERNAL_PASSWORD should be stored in Logstash keystore using ./scripts/auth_setup.sh
# See also volume mount for logstash.keystore below.
# ES_EXTERNAL_USER : 'janedoe'
# ES_EXTERNAL_PASSWORD : 'secret'
x-kibana-variables: &kibana-variables
KIBANA_OFFLINE_REGION_MAPS : 'true'
x-curator-variables: &curator-variables
# get index dates from actual date index was created (creation_date) vs. extracted from index name (name)
CURATOR_TIME_SOURCE : 'name'
# for managing automatic closing of older Elasticsearch indices (to conserve memory)
CURATOR_CLOSE_UNITS : years
CURATOR_CLOSE_COUNT : 10
# for managing automatic deleting of older Elasticsearch indices (to reduce disk consumption)
CURATOR_DELETE_UNITS : years
CURATOR_DELETE_COUNT : 99
# for managing automatic deleting of Elasticsearch indices based on cumulative size (to reduce disk consumption)
CURATOR_DELETE_GIGS : 1000000
# for managing automatic snapshots of Elasticsearch indices
CURATOR_SNAPSHOT_DISABLED : 'True'
# name of Elasticsearch snapshot repository under path.repo
CURATOR_SNAPSHOT_REPO : 'logs'
# controls compression of Elasticsearch snapshots managed by the curator
CURATOR_SNAPSHOT_COMPRESSED : 'false'
x-common-upload-variables: &common-upload-variables
AUTO_TAG : 'true'
x-common-beats-variables: &common-beats-variables
BEATS_SSL : 'false'
x-zeek-file-extraction-variables: &zeek-file-extraction-variables
ZEEK_EXTRACTOR_MODE : 'none'
EXTRACTED_FILE_IGNORE_EXISTING : 'false'
EXTRACTED_FILE_PRESERVATION : 'quarantined'
EXTRACTED_FILE_START_SLEEP : 30
EXTRACTED_FILE_MIN_BYTES : 64
EXTRACTED_FILE_MAX_BYTES : 134217728
VTOT_API2_KEY : '0'
VTOT_REQUESTS_PER_MINUTE : 4
EXTRACTED_FILE_ENABLE_CLAMAV : 'false'
EXTRACTED_FILE_ENABLE_FRESHCLAM : 'false'
x-pcap-capture-variables: &pcap-capture-variables
PCAP_ENABLE_NETSNIFF : 'false'
PCAP_ENABLE_TCPDUMP : 'false'
PCAP_IFACE : 'eth0'
PCAP_ROTATE_MEGABYTES : 500
PCAP_ROTATE_MINUTES : 30
PCAP_FILTER : ''
################################################################################
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.8.3
restart: "no"
hostname: elasticsearch
environment:
bootstrap.memory_lock : 'true'
ES_JAVA_OPTS : '-Xms4g -Xmx4g -Xss256k -Djava.security.egd=file:/dev/./urandom'
VIRTUAL_HOST : 'es.malcolm.local'
cluster.routing.allocation.disk.threshold_enabled : 'false'
cluster.routing.allocation.node_initial_primaries_recoveries : 8
cluster.max_shards_per_node : 2500
path.repo : '/opt/elasticsearch/backup'
expose:
- 9200
ulimits:
memlock:
soft: -1
hard: -1
cap_add:
- IPC_LOCK
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9200"]
interval: 30s
timeout: 15s
retries: 3
start_period: 180s
volumes:
- ./elasticsearch:/usr/share/elasticsearch/data:delegated
- ./elasticsearch-backup:/opt/elasticsearch/backup:delegated
kibana:
image: malcolmnetsec/kibana-oss:1.5.3
restart: "no"
hostname: kibana
environment:
<< : *kibana-variables
ELASTICSEARCH_URL : 'http://elasticsearch:9200'
VIRTUAL_HOST : 'kibana.malcolm.local'
CREATE_ES_MOLOCH_SESSION_INDEX : 'true'
MOLOCH_INDEX_PATTERN : 'sessions2-*'
MOLOCH_INDEX_PATTERN_ID : 'sessions2-*'
MOLOCH_INDEX_TIME_FIELD : 'firstPacket'
depends_on:
- elasticsearch
expose:
- 5601
- 28991
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5601/api/status"]
interval: 30s
timeout: 15s
retries: 3
start_period: 200s
elastalert:
image: malcolmnetsec/elastalert:1.5.3
restart: "no"
hostname: elastalert
environment:
ELASTICSEARCH_URL : 'http://elasticsearch:9200'
ES_HOST : 'elasticsearch'
ES_PORT : 9200
VIRTUAL_HOST : 'elastalert.malcolm.local'
depends_on:
- elasticsearch
expose:
- 3030
- 3333
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3030"]
interval: 30s
timeout: 15s
retries: 3
start_period: 200s
volumes:
- ./elastalert/config/elastalert.yaml:/opt/elastalert/config.yaml
- ./elastalert/config/smtp-auth.yaml:/opt/elastalert/smtp-auth.yaml:ro
- ./elastalert/config/config.json:/opt/elastalert-server/config/config.json
- ./elastalert/rules/:/opt/elastalert/rules/
curator:
image: malcolmnetsec/curator:1.5.3
restart: "no"
hostname: curator
environment:
<< : *curator-variables
ES_HOST : 'elasticsearch'
ES_PORT : 9200
depends_on:
- elasticsearch
logstash:
image: malcolmnetsec/logstash-oss:1.5.3
restart: "no"
hostname: logstash
environment:
<< : *logstash-variables
<< : *common-beats-variables
ES_HOSTS : 'elasticsearch:9200'
LS_JAVA_OPTS : '-Xms2g -Xmx2g -Djava.security.egd=file:/dev/./urandom'
depends_on:
- elasticsearch
expose:
- 5000
- 5044
- 9600
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9600"]
interval: 30s
timeout: 15s
retries: 3
start_period: 600s
volumes:
# - ./logstash/certs/logstash.keystore:/usr/share/logstash/config/logstash.keystore:ro
- ./logstash/certs/ca.crt:/certs/ca.crt:ro
- ./logstash/certs/server.crt:/certs/server.crt:ro
- ./logstash/certs/server.key:/certs/server.key:ro
- ./cidr-map.txt:/usr/share/logstash/config/cidr-map.txt:ro
- ./host-map.txt:/usr/share/logstash/config/host-map.txt:ro
filebeat:
image: malcolmnetsec/filebeat-oss:1.5.3
restart: "no"
hostname: filebeat
environment:
<< : *common-upload-variables
<< : *common-beats-variables
FILEBEAT_LOG_PATH : '/data/zeek/current'
FILEBEAT_LOG_CLEANUP_MINUTES : 0
FILEBEAT_ZIP_CLEANUP_MINUTES : 0
FILEBEAT_SCAN_FREQUENCY : '10s'
FILEBEAT_CLEAN_INACTIVE : '45m'
FILEBEAT_IGNORE_OLDER : '30m'
FILEBEAT_CLOSE_INACTIVE : '30s'
FILEBEAT_CLOSE_RENAMED : 'true'
FILEBEAT_CLOSE_REMOVED : 'true'
FILEBEAT_CLOSE_EOF : 'true'
FILEBEAT_CLEAN_REMOVED : 'true'
depends_on:
- logstash
volumes:
- ./zeek-logs:/data/zeek
- ./filebeat/certs/ca.crt:/certs/ca.crt:ro
- ./filebeat/certs/client.crt:/certs/client.crt:ro
- ./filebeat/certs/client.key:/certs/client.key:ro
moloch:
image: malcolmnetsec/moloch:1.5.3
restart: "no"
hostname: moloch
env_file:
- ./auth.env
environment:
<< : *common-upload-variables
<< : *moloch-variables
<< : *zeek-file-extraction-variables
MOLOCH_VERSION : '1.8.0'
VIRTUAL_HOST : 'moloch.malcolm.local'
ES_HOST : 'elasticsearch'
ES_PORT : 9200
VIEWER : 'on'
WISE : 'on'
ulimits:
memlock:
soft: -1
hard: -1
depends_on:
- elasticsearch
expose:
- 8000
- 8005
- 8081
volumes:
- ./pcap:/data/pcap
- ./zeek-logs/upload:/data/zeek/upload
- ./zeek-logs/extract_files:/data/zeek/extract_files
- ./moloch-logs:/data/moloch/logs
- ./moloch-raw:/data/moloch/raw
file-monitor:
image: malcolmnetsec/file-monitor:1.5.3
restart: "no"
hostname: filemon
environment:
<< : *zeek-file-extraction-variables
expose:
- 3310
volumes:
- ./zeek-logs/extract_files:/data/zeek/extract_files
- ./zeek-logs/current:/data/zeek/logs
pcap-capture:
image: malcolmnetsec/pcap-capture:1.5.3
restart: "no"
network_mode: host
ulimits:
memlock:
soft: -1
hard: -1
cap_add:
- IPC_LOCK
- NET_ADMIN
- NET_RAW
- SYS_ADMIN
environment:
<< : *pcap-capture-variables
volumes:
- ./pcap/upload:/pcap
upload:
image: malcolmnetsec/file-upload:1.5.3
restart: "no"
hostname: upload
env_file:
- ./auth.env
environment:
SITE_NAME : 'Capture File and Log Archive Upload'
VIRTUAL_HOST : 'upload.malcolm.local'
depends_on:
- moloch
expose:
- 80
ports:
- 127.0.0.1:8022:22
volumes:
- ./pcap/upload:/var/www/upload/server/php/chroot/files
htadmin:
image: malcolmnetsec/htadmin:1.5.3
restart: "no"
hostname: htadmin
environment:
VIRTUAL_HOST : 'htadmin.malcolm.local'
expose:
- 80
volumes:
- ./htadmin/config.ini:/var/www/htadmin/config/config.ini:rw
- ./htadmin/metadata:/var/www/htadmin/config/metadata:rw
- ./nginx/htpasswd:/var/www/htadmin/config/htpasswd:rw
nginx-proxy:
image: malcolmnetsec/nginx-proxy:1.5.3
restart: "no"
hostname: nginx-proxy
depends_on:
- moloch
- kibana
- upload
- htadmin
ports:
- "443:443"
- "488:488"
- "3030:3030"
- "5601:5601"
- "8443:8443"
- "9200:9200"
- "9600:9600"
- "28991:28991"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./nginx/htpasswd:/etc/nginx/.htpasswd:ro
- ./nginx/certs:/etc/nginx/certs:ro