Based on the official images:
Default configuration of Search Guard in this repo is:
Existing users:
vm.max_map_count on your hostYou need to increase the vm.max_map_count kernel setting on your Docker host.
To do this follow the recommended instructions from the Elastic documentation: Install Elasticsearch with Docker
Use EFK’s own nginx to create the nginx reverse-proxy setup rather than using docker-nginx-proxy There are two nginx templates for two different nginx-gens. Nginx-gen1 is for http and https and nginx-gen2 is for adding streaming to the nginx config file. Which template to use is decided by the Virtual Host and Port in docker-compose.yml i.e. {VIRTUAL_HOST1 and VIRTUAL_PORT1} or {VIRTUAL_HOST2 and VIRTUAL_PORT2}
When installing EFK on a new instance or changing the fluentd’s url, You will need to generate a letsencrypt certificate for it. This is generally done with having that url over port 80/443 rather than for streaming. So my work around for this was:
First create a fluentd container with VIRTUAL_HOST1 and VIRTUAL_PORT1 so as to let the letsencrypt be able to access it via https and create a certificate for it. Once the certificate is generated in the server, you stop and remove fluentd’s container, change docker-compose.yml to have { VIRTUAL_HOST2 and VIRTUAL_PORT2} and then relaunch the docker-compose.yml file.
This way you will then have the certificate for fluentd’s url. Once the fluentd’s certificate is generated, you need to go to it and copy the generated folder along with all the files into fluentd’s certs folder. This is for the other fluentd containers in client servers to verify main fluentd’s identity.
Deploy the fluetd in sender folder to all the client servers and direct all the container logs from the clients to their fluentd which will in turn encrypt them and send to the main fluentd.
Run launch.sh script to launch the EFK stack.
Run remove.sh script to remove the EFK stack including it's volume.
##OLD USAGE BELOW:
Warning! Use the below just for information but not for starting the EFK stack. Follow what is inside the launch script if you want to know the actual startup commands.
Start the ELK stack using docker-compose: docker-compose up -d
Search Guard must be initialized after Elasticsearch is started:
$ docker exec elasticsearch bin/init_sg.sh
This executes sgadmin and load the configuration in elasticsearch/config/sg*.yml
Access Kibana UI by hitting http://localhost:5601 with a web browser and use the following credentials to login:
Refer to the sg_internal_users.yml configuration file for a list of built-in users.
And refer to [`sg_roles.yml and sg_roles_mapping.yml '] for the access levels of built-in users
By default, the stack exposes the following ports:
NOTE: Configuration is not dynamically reloaded, you will need to restart the stack after any change in the configuration of a component.
The Kibana default configuration is stored in kibana/config/kibana.yml.
The Elasticsearch container is using the shipped configuration.
If you want to override the default configuration, create a file elasticsearch/config/elasticsearch.yml and add your configuration in it.
Then, you'll need to map your configuration file inside the container in the docker-compose.yml. Update the elasticsearch container declaration to:
elasticsearch:
build: elasticsearch/
volumes:
- ./elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
You can also specify the options you want to override directly via environment variables:
To add plugins to any EFK component you have to:
RUN statement to the corresponding Dockerfile (eg. RUN logstash-plugin install logstash-filter-json)docker pull labshare/log-es:latest