Check out this project and following thisa above steps:
-
Run the following command:
sudo sysctl -w vm.max_map_count=262144
-
Run
git clone git@github.com:augustomarinho/springboot-fluentd-appender.git
-
Run
mvn clean install docker:build
-
Run
docker run -d --name springboot-app \ --label elastic_index=springboot \ --label send.logs=true \ -p 8002:8080 \ augustomarinho/springboot-fluentd-appender
-
Edit your Elastic Search IP in filebeat.yml
-
Run
docker run -d \ --name=filebeat \ --user=root \ --volume="$(pwd)/configs/filebeat/filebeat.yml:/usr/share/filebeat/filebeat.yml:ro" \ --volume="/var/lib/docker/containers:/var/lib/docker/containers:ro" \ --volume="/var/run/docker.sock:/var/run/docker.sock:ro" \ docker.elastic.co/beats/filebeat:7.0.0 filebeat -e -strict.perms=false
-
Run
docker-compose -f docker-compose-es-kibana.yml -d --force-recreate
-
Open Kibana Dev Tools
-
In Kibana Dev Tools, execute this http command in sequence
From here, It's possible insert documents in created index, running this command: curl -X GET http://localhost:8002/query/cpf/12345678909 -i
Execute some time this commnad above to insert more documents in created index.
For you check roll over index working, run the commands below in Kibana Dev Tools:
-
Write more documents in rolled over index. Run
curl -X GET http://localhost:8002/query/cpf/12345678909 -i
For testing the index aggregation in the same reading alias, run the commands below in Kibana Dev Tools
-
Edit de timestamp value for curent time, before running write-index-app-2.txt
Following this steps, It's possible test the roll over index using ILM (Index Lifecycle Management) from Elastic Search