forked from wazuh/wazuh-docker
Compare commits
12
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
76945a2698 | ||
|
|
98007ea2f4 | ||
|
|
b081ff3bc7 | ||
|
|
716667be46 | ||
|
|
2b3f71aa10 | ||
|
|
74dd541bd8 | ||
|
|
8a051b67b0 | ||
|
|
7da29fa6a9 | ||
|
|
ca1a1bd883 | ||
|
|
d8fe59901a | ||
|
|
3cae6fe61d | ||
|
|
a26f119c73 |
+10
-8
@@ -13,8 +13,8 @@ services:
|
||||
networks:
|
||||
- docker_elk
|
||||
# volumes:
|
||||
# - my-path:/var/ossec/data
|
||||
# - my-path:/etc/postfix
|
||||
# - my-path:/var/ossec/data:Z
|
||||
# - my-path:/etc/postfix:Z
|
||||
depends_on:
|
||||
- elasticsearch
|
||||
logstash:
|
||||
@@ -23,7 +23,7 @@ services:
|
||||
restart: always
|
||||
command: -f /etc/logstash/conf.d/
|
||||
# volumes:
|
||||
# - my-path:/etc/logstash/conf.d
|
||||
# - my-path:/etc/logstash/conf.d:Z
|
||||
links:
|
||||
- kibana
|
||||
- elasticsearch:elasticsearch
|
||||
@@ -37,7 +37,7 @@ services:
|
||||
- LS_HEAP_SIZE=2048m
|
||||
- XPACK_MONITORING_ENABLED=false
|
||||
elasticsearch:
|
||||
image: docker.elastic.co/elasticsearch/elasticsearch:6.1.1
|
||||
image: docker.elastic.co/elasticsearch/elasticsearch:6.1.3
|
||||
hostname: elasticsearch
|
||||
restart: always
|
||||
ports:
|
||||
@@ -60,7 +60,7 @@ services:
|
||||
hard: -1
|
||||
mem_limit: 2g
|
||||
# volumes:
|
||||
# - my-path:/usr/share/elasticsearch/data
|
||||
# - my-path:/usr/share/elasticsearch/data:Z
|
||||
networks:
|
||||
- docker_elk
|
||||
kibana:
|
||||
@@ -69,16 +69,16 @@ services:
|
||||
restart: always
|
||||
# ports:
|
||||
# - "5601:5601"
|
||||
environment:
|
||||
- "NODE_OPTIONS=--max-old-space-size=3072"
|
||||
networks:
|
||||
- docker_elk
|
||||
- docker_elk
|
||||
depends_on:
|
||||
- elasticsearch
|
||||
links:
|
||||
- elasticsearch:elasticsearch
|
||||
- wazuh
|
||||
entrypoint: /wait-for-it.sh elasticsearch
|
||||
# environment:
|
||||
# - "WAZUH_KIBANA_PLUGIN_URL=http://your.repo/wazuhapp-3.1.0-6.1.0.zip"
|
||||
nginx:
|
||||
image: wazuh/wazuh-nginx
|
||||
hostname: nginx
|
||||
@@ -89,6 +89,8 @@ services:
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
# volumes:
|
||||
# - my-path:/etc/nginx/conf.d:Z
|
||||
networks:
|
||||
- docker_elk
|
||||
depends_on:
|
||||
|
||||
+13
-1
@@ -1,4 +1,4 @@
|
||||
FROM docker.elastic.co/kibana/kibana:6.1.1
|
||||
FROM docker.elastic.co/kibana/kibana:6.1.3
|
||||
|
||||
USER root
|
||||
|
||||
@@ -6,4 +6,16 @@ COPY ./config/kibana.yml /usr/share/kibana/config/kibana.yml
|
||||
|
||||
COPY config/wait-for-it.sh /wait-for-it.sh
|
||||
|
||||
ADD https://packages.wazuh.com/wazuhapp/wazuhapp-3.1.0_6.1.3.zip /tmp
|
||||
|
||||
ADD https://raw.githubusercontent.com/wazuh/wazuh/3.1/extensions/elasticsearch/wazuh-elastic6-template-alerts.json /usr/share/kibana/config
|
||||
|
||||
ADD https://raw.githubusercontent.com/wazuh/wazuh/3.1/extensions/elasticsearch/wazuh-elastic6-template-monitoring.json /usr/share/kibana/config
|
||||
|
||||
ADD https://raw.githubusercontent.com/wazuh/wazuh/3.1/extensions/elasticsearch/alert_sample.json /usr/share/kibana/config
|
||||
|
||||
RUN /usr/share/kibana/bin/kibana-plugin install file:///tmp/wazuhapp-3.1.0_6.1.3.zip
|
||||
|
||||
RUN rm -rf /tmp/*
|
||||
|
||||
RUN chmod 755 /wait-for-it.sh
|
||||
|
||||
@@ -5,7 +5,6 @@ set -e
|
||||
host="$1"
|
||||
shift
|
||||
cmd="kibana"
|
||||
WAZUH_KIBANA_PLUGIN_URL=${WAZUH_KIBANA_PLUGIN_URL:-https://packages.wazuh.com/wazuhapp/wazuhapp-3.1.0_6.1.1.zip}
|
||||
|
||||
until curl -XGET $host:9200; do
|
||||
>&2 echo "Elastic is unavailable - sleeping"
|
||||
@@ -14,28 +13,20 @@ done
|
||||
|
||||
>&2 echo "Elastic is up - executing command"
|
||||
|
||||
#Insert default templates
|
||||
curl https://raw.githubusercontent.com/wazuh/wazuh/3.0/extensions/elasticsearch/wazuh-elastic6-template-alerts.json | curl -XPUT 'http://elasticsearch:9200/_template/wazuh' -H 'Content-Type: application/json' -d @-
|
||||
sleep 5
|
||||
#Insert default templates
|
||||
cat /usr/share/kibana/config/wazuh-elastic6-template-alerts.json | curl -XPUT 'http://elasticsearch:9200/_template/wazuh' -H 'Content-Type: application/json' -d @-
|
||||
|
||||
curl https://raw.githubusercontent.com/wazuh/wazuh/3.0/extensions/elasticsearch/wazuh-elastic6-template-monitoring.json | curl -XPUT 'http://elasticsearch:9200/_template/wazuh-agent' -H 'Content-Type: application/json' -d @-
|
||||
sleep 5
|
||||
#Insert default templates
|
||||
cat /usr/share/kibana/config/wazuh-elastic6-template-monitoring.json | curl -XPUT 'http://elasticsearch:9200/_template/wazuh-agent' -H 'Content-Type: application/json' -d @-
|
||||
|
||||
#Insert sample alert:
|
||||
sleep 5
|
||||
curl https://raw.githubusercontent.com/wazuh/wazuh/3.0/extensions/elasticsearch/alert_sample.json | curl -XPUT "http://elasticsearch:9200/wazuh-alerts-3.x-"`date +%Y.%m.%d`"/wazuh/sample" -H 'Content-Type: application/json' -d @-
|
||||
cat /usr/share/kibana/config/alert_sample.json | curl -XPUT "http://elasticsearch:9200/wazuh-alerts-3.x-"`date +%Y.%m.%d`"/wazuh/sample" -H 'Content-Type: application/json' -d @-
|
||||
|
||||
sleep 5
|
||||
|
||||
|
||||
if /usr/share/kibana/bin/kibana-plugin list | grep wazuh; then
|
||||
echo "Wazuh APP already installed"
|
||||
else
|
||||
/usr/share/kibana/bin/kibana-plugin install ${WAZUH_KIBANA_PLUGIN_URL}
|
||||
fi
|
||||
|
||||
sleep 30
|
||||
|
||||
echo "Setting API credentials into Wazuh APP"
|
||||
|
||||
CONFIG_CODE=$(curl -s -o /dev/null -w "%{http_code}" -XGET http://$host:9200/.wazuh/wazuh-configuration/1513629884013)
|
||||
if [ "x$CONFIG_CODE" = "x404" ]; then
|
||||
curl -s -XPOST http://$host:9200/.wazuh/wazuh-configuration/1513629884013 -H 'Content-Type: application/json' -d'
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
FROM docker.elastic.co/logstash/logstash:6.1.1
|
||||
FROM docker.elastic.co/logstash/logstash:6.1.3
|
||||
|
||||
COPY config/logstash.conf /etc/logstash/conf.d/logstash.conf
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
FROM phusion/baseimage:latest
|
||||
ARG FILEBEAT_VERSION=6.1.0
|
||||
ARG FILEBEAT_VERSION=6.1.3
|
||||
|
||||
RUN apt-get update; apt-get -y dist-upgrade
|
||||
RUN apt-get -y install openssl postfix bsd-mailx curl apt-transport-https lsb-release
|
||||
|
||||
Reference in New Issue
Block a user