1
+ name : " manager-splunk-integration"
2
+
3
+ services :
4
+ events-generator :
5
+ image : wazuh/indexer-events-generator
6
+ build :
7
+ context : ../tools/events-generator
8
+ depends_on :
9
+ wazuh.indexer :
10
+ condition : service_healthy
11
+ command : bash -c "python run.py -o filebeat"
12
+ volumes :
13
+ - alerts:/var/ossec/logs/alerts/
14
+
15
+ wazuh.manager :
16
+ image : wazuh/wazuh-manager:${WAZUH_VERSION}
17
+ hostname : wazuh.manager
18
+ restart : always
19
+ ulimits :
20
+ memlock :
21
+ soft : -1
22
+ hard : -1
23
+ nofile :
24
+ soft : 655360
25
+ hard : 655360
26
+ ports :
27
+ - " 1514:1514"
28
+ - " 1515:1515"
29
+ - " 514:514/udp"
30
+ - " 55000:55000"
31
+ environment :
32
+ - INDEXER_URL=https://wazuh.indexer:9200
33
+ - INDEXER_USERNAME=admin
34
+ - INDEXER_PASSWORD=admin
35
+ - FILEBEAT_SSL_VERIFICATION_MODE=full
36
+ - SSL_CERTIFICATE_AUTHORITIES=/etc/ssl/root-ca.pem
37
+ - SSL_CERTIFICATE=/etc/ssl/filebeat.pem
38
+ - SSL_KEY=/etc/ssl/filebeat.key
39
+ - API_USERNAME=wazuh-wui
40
+ - API_PASSWORD=MyS3cr37P450r.*-
41
+ - LOG_LEVEL=info
42
+ - MONITORING_ENABLED=false
43
+ volumes :
44
+ - ./certs/root-ca-manager.pem:/etc/ssl/root-ca.pem
45
+ - ./certs/wazuh.manager.pem:/etc/ssl/filebeat.pem
46
+ - ./certs/wazuh.manager-key.pem:/etc/ssl/filebeat.key
47
+ - ./certs/root-ca.pem:/usr/share/logstash/root-ca.pem
48
+ - alerts:/var/ossec/logs/alerts/
49
+
50
+ wazuh.indexer :
51
+ image : opensearchproject/opensearch:2.12.0
52
+ depends_on :
53
+ wazuh-certs-generator :
54
+ condition : service_completed_successfully
55
+ hostname : wazuh.indexer
56
+ ports :
57
+ - 9200:9200
58
+ environment :
59
+ - node.name=wazuh.indexer
60
+ - discovery.type=single-node
61
+ - bootstrap.memory_lock=true
62
+ - " DISABLE_INSTALL_DEMO_CONFIG=true"
63
+ - plugins.security.ssl.http.enabled=true
64
+ - plugins.security.allow_default_init_securityindex=true
65
+ - plugins.security.ssl.http.pemcert_filepath=/usr/share/opensearch/config/wazuh.indexer.pem
66
+ - plugins.security.ssl.transport.pemcert_filepath=/usr/share/opensearch/config/wazuh.indexer.pem
67
+ - plugins.security.ssl.http.pemkey_filepath=/usr/share/opensearch/config/wazuh.indexer-key.pem
68
+ - plugins.security.ssl.transport.pemkey_filepath=/usr/share/opensearch/config/wazuh.indexer-key.pem
69
+ - plugins.security.ssl.http.pemtrustedcas_filepath=/usr/share/opensearch/config/root-ca.pem
70
+ - plugins.security.ssl.transport.pemtrustedcas_filepath=/usr/share/opensearch/config/root-ca.pem
71
+ - plugins.security.authcz.admin_dn="CN=wazuh.indexer,OU=Wazuh,O=Wazuh,L=California, C=US"
72
+ - " OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
73
+ - compatibility.override_main_response_version=true
74
+ ulimits :
75
+ memlock :
76
+ soft : -1
77
+ hard : -1
78
+ nofile :
79
+ soft : 65536
80
+ hard : 65536
81
+ healthcheck :
82
+ test : curl -sku admin:admin https://localhost:9200/_cat/health | grep -q docker-cluster
83
+ start_period : 10s
84
+ start_interval : 3s
85
+ volumes :
86
+ - data:/usr/share/opensearch/data
87
+ - ./certs/wazuh.indexer.pem:/usr/share/opensearch/config/wazuh.indexer.pem
88
+ - ./certs/wazuh.indexer-key.pem:/usr/share/opensearch/config/wazuh.indexer-key.pem
89
+ - ./certs/root-ca.pem:/usr/share/opensearch/config/root-ca.pem
90
+
91
+ wazuh-certs-generator :
92
+ image : wazuh/wazuh-certs-generator:0.0.1
93
+ hostname : wazuh-certs-generator
94
+ entrypoint : sh -c "/entrypoint.sh; chown -R 1000:999 /certificates; chmod 740 /certificates; chmod 440 /certificates/*"
95
+ volumes :
96
+ - ./certs/:/certificates/
97
+ - ./config/certs.yml:/config/certs.yml
98
+
99
+ logstash :
100
+ depends_on :
101
+ splunk :
102
+ condition : service_healthy
103
+ wazuh-certs-generator :
104
+ condition : service_completed_successfully
105
+ image : logstash-oss:8.6.2
106
+ build :
107
+ dockerfile : ../elastic/Dockerfile
108
+ context : ../splunk
109
+ environment :
110
+ LOG_LEVEL : info
111
+ MONITORING_ENABLED : false
112
+ volumes :
113
+ - ../splunk/logstash/pipeline:/usr/share/logstash/pipeline
114
+ - ./certs/root-ca.pem:/etc/ssl/root-ca.pem
115
+ - alerts:/var/ossec/logs/alerts/
116
+ command : logstash -f /usr/share/logstash/pipeline/manager-to-splunk.conf
117
+
118
+ # ================================================
119
+ # Splunk
120
+ # ================================================
121
+
122
+ generator :
123
+ image : cfssl/cfssl
124
+ depends_on :
125
+ wazuh-certs-generator :
126
+ condition : service_completed_successfully
127
+ volumes :
128
+ - ./certs/:/certs/
129
+ - ../splunk/cfssl/:/conf/
130
+ entrypoint : /bin/bash
131
+ command : >
132
+ -c '
133
+ cd /certs
134
+ cat /conf/host.json | \
135
+ cfssl gencert \
136
+ -ca root-ca.pem \
137
+ -ca-key root-ca.key \
138
+ -config /conf/cfssl.json \
139
+ -profile=server - | \
140
+ cfssljson -bare splunk
141
+ openssl pkcs8 -topk8 -inform pem -in splunk-key.pem -outform pem -nocrypt -out splunk.key
142
+ rm splunk.csr
143
+ cat splunk.pem splunk-key.pem root-ca.pem > splunkhec.pem
144
+ chown -R 1000:1000 /certs/splunk*
145
+ '
146
+
147
+ splunk :
148
+ image : splunk/splunk:9.0.4
149
+ volumes :
150
+ - ./certs/splunk.key:/opt/splunk/etc/auth/custom/splunk.key
151
+ - ./certs/splunk.pem:/opt/splunk/etc/auth/custom/splunk.pem
152
+ - ./certs/splunkhec.pem:/opt/splunk/etc/auth/custom/splunkhec.pem
153
+ - ../splunk/config/indexes.conf:/opt/splunk/etc/system/local/indexes.conf
154
+ - ../splunk/config/default.yml:/tmp/defaults/default.yml
155
+ depends_on :
156
+ generator :
157
+ condition : service_completed_successfully
158
+ ports :
159
+ - ' 8000:8000'
160
+ - ' 8088:8088'
161
+ environment :
162
+ SPLUNK_HEC_TOKEN : " abcd1234"
163
+ SPLUNK_HOSTNAME : splunk
164
+ SPLUNK_HTTP_ENABLESSL : ' true'
165
+ SPLUNK_PASSWORD : Password.1234
166
+ SPLUNK_STANDALONE_URL : https://splunk:8080
167
+ SPLUNK_START_ARGS : --accept-license
168
+
169
+ volumes :
170
+ data :
171
+ es_certs :
172
+ alerts:
0 commit comments