Compare commits

...
Author SHA1 Message Date
Miguelangel Freitas 76945a2698 Increase the default Node.js heap memory. 2018-02-09 14:46:30 -05:00
José Luis Ruiz Ruiz 98007ea2f4 Update to Elastic 6.1.3 2018-02-08 16:14:04 +01:00
José Luis Ruiz b081ff3bc7 Merge pull request #36 from FloThinksPi/master
Improved Kibana Image to include all Dependencies
2018-02-08 13:33:04 +01:00
Florian Braun 716667be46 Adoptions and Cleanup for new Dockerfile
So i cleaned this up so that the plugin install is gone now as it is done on container image build. Also the image includes the Templates and Sample alerts so i adopted the script to deliver the files via the local files that are included in the container.
2018-02-08 11:22:38 +01:00
Florian Braun 2b3f71aa10 Buildin all dependencies into the Container
We Download and install all external dependencys in our container. So no network intreraction will be required by Kibana on launch of the container. This also saves time on launch as the plugin only has to be installed on container build. So with this dockerfile all stuff is in the image and does not need downloads on deploy.
2018-02-08 11:20:48 +01:00
Florian Braun 74dd541bd8 Cleanup Kibana
Kibana also does not need the environment for downloading the plugin as it is already installed in the image
2018-02-08 11:18:32 +01:00
Florian Braun 8a051b67b0 Removed Proxy in docker-compose.yml
The new Kibana container will be designed to run completely local. no need for proxy anymore
2018-02-08 10:57:35 +01:00
5 changed files with 23 additions and 22 deletions
+4 -6
View File
@@ -37,7 +37,7 @@ services:
- LS_HEAP_SIZE=2048m - LS_HEAP_SIZE=2048m
- XPACK_MONITORING_ENABLED=false - XPACK_MONITORING_ENABLED=false
elasticsearch: elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.1.2 image: docker.elastic.co/elasticsearch/elasticsearch:6.1.3
hostname: elasticsearch hostname: elasticsearch
restart: always restart: always
ports: ports:
@@ -69,18 +69,16 @@ services:
restart: always restart: always
# ports: # ports:
# - "5601:5601" # - "5601:5601"
environment:
- "NODE_OPTIONS=--max-old-space-size=3072"
networks: networks:
- docker_elk - docker_elk
depends_on: depends_on:
- elasticsearch - elasticsearch
links: links:
- elasticsearch:elasticsearch - elasticsearch:elasticsearch
- wazuh - wazuh
entrypoint: /wait-for-it.sh elasticsearch entrypoint: /wait-for-it.sh elasticsearch
# environment:
# - http_proxy=yourproxy
# - https_proxy=yourproxy
# - "WAZUH_KIBANA_PLUGIN_URL=http://your.repo/wazuhapp-3.1.0-6.1.2.zip"
nginx: nginx:
image: wazuh/wazuh-nginx image: wazuh/wazuh-nginx
hostname: nginx hostname: nginx
+13 -1
View File
@@ -1,4 +1,4 @@
FROM docker.elastic.co/kibana/kibana:6.1.2 FROM docker.elastic.co/kibana/kibana:6.1.3
USER root 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 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 RUN chmod 755 /wait-for-it.sh
+4 -13
View File
@@ -5,7 +5,6 @@ set -e
host="$1" host="$1"
shift shift
cmd="kibana" cmd="kibana"
WAZUH_KIBANA_PLUGIN_URL=${WAZUH_KIBANA_PLUGIN_URL:-https://packages.wazuh.com/wazuhapp/wazuhapp-3.1.0_6.1.2.zip}
until curl -XGET $host:9200; do until curl -XGET $host:9200; do
>&2 echo "Elastic is unavailable - sleeping" >&2 echo "Elastic is unavailable - sleeping"
@@ -16,26 +15,18 @@ done
sleep 5 sleep 5
#Insert default templates #Insert default templates
curl https://raw.githubusercontent.com/wazuh/wazuh/3.1/extensions/elasticsearch/wazuh-elastic6-template-alerts.json | curl -XPUT 'http://elasticsearch:9200/_template/wazuh' -H 'Content-Type: application/json' -d @- cat /usr/share/kibana/config/wazuh-elastic6-template-alerts.json | curl -XPUT 'http://elasticsearch:9200/_template/wazuh' -H 'Content-Type: application/json' -d @-
sleep 5 sleep 5
#Insert default templates #Insert default templates
curl https://raw.githubusercontent.com/wazuh/wazuh/3.1/extensions/elasticsearch/wazuh-elastic6-template-monitoring.json | curl -XPUT 'http://elasticsearch:9200/_template/wazuh-agent' -H 'Content-Type: application/json' -d @- 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: #Insert sample alert:
sleep 5 sleep 5
curl https://raw.githubusercontent.com/wazuh/wazuh/3.1/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 @-
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
sleep 5
echo "Setting API credentials into Wazuh APP" 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) CONFIG_CODE=$(curl -s -o /dev/null -w "%{http_code}" -XGET http://$host:9200/.wazuh/wazuh-configuration/1513629884013)
if [ "x$CONFIG_CODE" = "x404" ]; then if [ "x$CONFIG_CODE" = "x404" ]; then
curl -s -XPOST http://$host:9200/.wazuh/wazuh-configuration/1513629884013 -H 'Content-Type: application/json' -d' curl -s -XPOST http://$host:9200/.wazuh/wazuh-configuration/1513629884013 -H 'Content-Type: application/json' -d'
+1 -1
View File
@@ -1,3 +1,3 @@
FROM docker.elastic.co/logstash/logstash:6.1.2 FROM docker.elastic.co/logstash/logstash:6.1.3
COPY config/logstash.conf /etc/logstash/conf.d/logstash.conf COPY config/logstash.conf /etc/logstash/conf.d/logstash.conf
+1 -1
View File
@@ -1,5 +1,5 @@
FROM phusion/baseimage:latest FROM phusion/baseimage:latest
ARG FILEBEAT_VERSION=6.1.2 ARG FILEBEAT_VERSION=6.1.3
RUN apt-get update; apt-get -y dist-upgrade RUN apt-get update; apt-get -y dist-upgrade
RUN apt-get -y install openssl postfix bsd-mailx curl apt-transport-https lsb-release RUN apt-get -y install openssl postfix bsd-mailx curl apt-transport-https lsb-release