The main goal for creating this stack was to provide the environment of ELK(Elasticsearch, Logstash and Kibana) for different types of POCs. 🙂
In the end result you will get a beautiful kibana dashboard like this:-
We are using the official image from Elastic:-
This compose setup will setup these things for you:-
- Elasticsearch
- Kibana
- Logstash
- Apache
- Docker version 18.X+
- Docker Compose version 1.12.0+
- Host Machine with 1.5GB Ram
├── apache ---> Dockerfile and confiuration file for apache
├── elasticsearch ---> Dockerfile and configuration file for elasticsearch
├── img ---> For storing image and screenshots
├── kibana ---> Dockerfile and configuration file for kibana
└── logstash ---> Dockerfile and configuration file for logstash
└── conf.d ---> Logstash configuration for beats, filter and outputs
This setup will expose these ports:-
- 9200: Elasticsearch HTTP endpoint
- 9300: Elasticsearch TCP endpoint
- 5601: Kibana UI
- 5044: Logstash beats input
export ELK_VERSION=7.3.1
docker-compose build
docker-compose up -d
docker-compose down -v
After this steps, now you can go and login into kibana and visualize your logs:-
- Kibana Url:- http://<your_ip>:5601
- Username:- elastic
- Password:- elastic
- Add some dashboards for Apache
- Create a canvas for logs
You can import the kibana dashboard as well which is here
Here are some awesome screenshots you will get after importing the dashboard.