Compare commits

...

12 Commits

Author SHA1 Message Date
José Luis Ruiz
d1cb67a822 Upgrade Wazuh version to 2.1.0 2017-08-17 18:46:27 -04:00
Jose Luis
e69d9d0efc Merge pull request #14 from peteralcock/patch-2
Fix ES hostname resolution for kibana/logstash
2017-08-17 15:03:42 -07:00
Peter Alcock
08824ad4a9 Fix ES hostname resolution for kibana/logstash
Without linking the containers with explicitly declared container name mappings, the "elasticsearch" hostname is not being resolved by the kibana or logstash containers. This fixes that.
2017-08-17 14:55:48 -04:00
Jose Luis
a4d4c40ad5 Merge pull request #13 from davidkarlsen/master
Upgrade to ELK 5.5.1
2017-08-03 11:42:07 +02:00
david
84005d8145 Upgrade to ELK 5.5.1 2017-08-03 11:30:47 +02:00
Jose Luis
aef418c75e Merge pull request #12 from davidkarlsen/master
fix docs
2017-08-02 20:18:54 +02:00
david
5cffb99d67 fix docs 2017-08-02 20:12:57 +02:00
Jose Luis Ruiz
1c935bbf07 update to wazuh-2.0.1 and Elastic 5.5.0 2017-07-25 22:30:44 +02:00
Santiago Bassett
38608d1f26 Fixed link names 2017-07-14 11:23:00 -05:00
Santiago Bassett
eae7328f16 Fixed hyperlink 2017-07-14 11:21:52 -05:00
Santiago Bassett
82ef76ed4d Updated README and docker-compose to avoid error with UDP sockets. 2017-07-14 10:34:11 -05:00
Santiago Bassett
548a738d69 Updated README 2017-07-14 09:12:29 -05:00
6 changed files with 48 additions and 23 deletions

View File

@@ -1,21 +1,42 @@
# IMPORTANT NOTE
# Wazuh containers for Docker
The first time than you runt this container can take a while until kibana finish the configuration, the Wazuh plugin can take a few minutes until finish the instalation, please be patient.
In this repository you will find the containers to run:
# Docker container Wazuh 2.0 + ELK(5.4.2)
* wazuh: It runs the Wazuh manager, Wazuh API and Filebeat (for integration with Elastic Stack)
* wazuh-logstash: It is used to receive alerts generated by the manager and feed Elasticsearch using an alerts template
* wazuh-kibana: Provides a web user interface to browse through alerts data. It includes Wazuh plugin for Kibana, that allows you to visualize agents configuration and status.
This Docker container source files can be found in our [Wazuh Github repository](https://github.com/wazuh/wazuh). It includes both an OSSEC manager and an Elasticsearch single-node cluster, with Logstash and Kibana. You can find more information on how these components work together in our documentation.
In addition, a docker-compose file is provided to launch the containers mentioned above. It also launches an Elasticsearch container (working as a single-node cluster) using Elastic Stack Docker images.
## Documentation
## Current release
* [Full documentation](http://documentation.wazuh.com)
* [Wazuh-docker module documentation](https://documentation.wazuh.com/current/docker/index.html)
* [Hub docker](https://hub.docker.com/u/wazuh)
Containers are currently tested on Wazuh version 2.0 and Elastic Stack version 5.5.1. We will do our best to keep this repository updated to latest versions of both Wazuh and Elastic Stack.
## Credits and thank you
## Installation notes
These Docker containers are based on "deviantony" dockerfiles which can be found at [https://github.com/deviantony/docker-elk] (https://github.com/deviantony/docker-elk), and "xetus-oss" dockerfiles, which can be found at [https://github.com/xetus-oss/docker-ossec-server](https://github.com/xetus-oss/docker-ossec-server). We created our own fork, which we test and maintain. Thank you Anthony Lapenna for your contribution to the community.
To run all docker instances you can just run ``docker-compose up``, from the directory where you have docker-compose.yml file. The following is part of the expected behavior when setting up the system:
## References
* Both wazuh-kibana and wazuh-logstash containers will run multiple queries to Elasticsearch API using curl, to learn when Elasticsearch is up. It is expected to see several ``Failed to connect to elasticsearch port 9200`` log messages, until Elasticesearch is started. Then the set up process will continue normally.
* Kibana container can take a few minutes to install Wazuh plugin, this takes place after ``Optimizing and caching browser bundles...`` is printed out.
* It is recommended to set Docker host preferences to give at least 4GB memory per container (this doesn't necessarily mean they all will use it, but Elasticsearch requires them to work properly).
* [Wazuh website](http://wazuh.com)
Once installed you can browse through the interface at: http://127.0.0.1:5601
## More documentation
* [Wazuh full documentation](http://documentation.wazuh.com)
* [Wazuh documentation for Docker](https://documentation.wazuh.com/current/docker/index.html)
* [Docker hub](https://hub.docker.com/u/wazuh)
## Credits
These Docker containers are based on:
* "deviantony" dockerfiles which can be found at [https://github.com/deviantony/docker-elk](https://github.com/deviantony/docker-elk)
* "xetus-oss" dockerfiles, which can be found at [https://github.com/xetus-oss/docker-ossec-server](https://github.com/xetus-oss/docker-ossec-server)
We thank you them and everyone else who has contributed to this project.
## Wazuh official website
[Wazuh website](http://wazuh.com)

View File

@@ -6,9 +6,9 @@ services:
hostname: wazuh-manager
restart: always
ports:
- "1514/udp:1514/udp"
- "1514:1514/udp"
- "1515:1515"
- "514/udp:514/udp"
- "514:514/udp"
- "55000:55000"
networks:
- docker_elk
@@ -26,7 +26,7 @@ services:
# - my-path:/etc/logstash/conf.d
links:
- kibana
- elasticsearch
- elasticsearch:elasticsearch
ports:
- "5000:5000"
networks:
@@ -36,7 +36,7 @@ services:
environment:
- LS_HEAP_SIZE=2048m
elasticsearch:
image: elasticsearch:5.4.2
image: elasticsearch:5.5.1
hostname: elasticsearch
restart: always
command: elasticsearch -E node.name="node-1" -E cluster.name="wazuh" -E network.host=0.0.0.0
@@ -59,9 +59,11 @@ services:
- docker_elk
depends_on:
- elasticsearch
links:
- elasticsearch:elasticsearch
entrypoint: sh wait-for-it.sh elasticsearch
# environment:
# - "WAZUH_KIBANA_PLUGIN_URL=http://your.repo/wazuhapp-2.0_5.4.2.zip"
# - "WAZUH_KIBANA_PLUGIN_URL=http://your.repo/wazuhapp-2.1.0-5.5.1.zip"
networks:
docker_elk:

View File

@@ -1,4 +1,4 @@
FROM kibana:5.4.2
FROM kibana:5.5.1
RUN apt-get update && apt-get install -y curl

View File

@@ -5,7 +5,7 @@ set -e
host="$1"
shift
cmd="kibana"
WAZUH_KIBANA_PLUGIN_URL=${WAZUH_KIBANA_PLUGIN_URL:-https://packages.wazuh.com/wazuhapp/wazuhapp-2.0_5.4.2.zip}
WAZUH_KIBANA_PLUGIN_URL=${WAZUH_KIBANA_PLUGIN_URL:-https://packages.wazuh.com/wazuhapp/wazuhapp-2.1.0_5.5.1.zip}
until curl -XGET $host:9200; do
>&2 echo "Elastic is unavailable - sleeping"

View File

@@ -1,4 +1,4 @@
FROM logstash:5.4.2
FROM logstash:5.5.1
RUN apt-get update

View File

@@ -1,5 +1,5 @@
FROM centos:latest
ARG FILEBEAT_VERSION=5.5.1
COPY config/*.repo /etc/yum.repos.d/
RUN yum -y update; yum clean all;
@@ -7,6 +7,8 @@ RUN yum -y install epel-release openssl useradd; yum clean all
RUN yum -y install postfix mailx cyrus-sasl cyrus-sasl-plain; yum clean all
RUN groupadd -g 1000 ossec
RUN useradd -u 1000 -g 1000 ossec
RUN curl --silent --location https://rpm.nodesource.com/setup_6.x | bash - &&\
yum install -y nodejs
RUN yum install -y wazuh-manager wazuh-api
@@ -18,8 +20,8 @@ RUN chmod 755 /init.bash &&\
sync && rm /init.bash
RUN curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-5.4.2-x86_64.rpm &&\
rpm -vi filebeat-5.4.2-x86_64.rpm && rm filebeat-5.4.2-x86_64.rpm
RUN curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-${FILEBEAT_VERSION}-x86_64.rpm &&\
rpm -vi filebeat-${FILEBEAT_VERSION}-x86_64.rpm && rm filebeat-${FILEBEAT_VERSION}-x86_64.rpm
COPY config/filebeat.yml /etc/filebeat/