The article describes how to apply ELK-Stack functionality to SAP Commerce (Hybris) for a local environment. I do not recommend this manual as presented here for any production purposes.
If you just want to get already configured docker containers with ELK-stack, see the instructions at the end of the page.
In short, we will use the solution based on docker-elk which based on the official Docker images from Elastic:
Make sure you have installed the software below:
If you use Linux, make sure your user has the required permissions to interact with the Docker daemon.
Create the docker group.
sudo groupadd docker
Add your user to the docker group.
sudo usermod -aG docker $USER
Clone the elk repo:
git clone firstname.lastname@example.org:deviantony/docker-elk.git
It will help us to avoid out-of-memory exception, because Hybris logs could be large.
Open docker-compose.yml, find the section logstash.environment.
Change the LS_JAVA_OPTS from:
Open docker-compose.yml, find the section logstash.volumes.
Add your hybris log path:
In the section input add new section file.
port => 5044
port => 5000
path => "/var/log/hybris/*.log"
start_position => "beginning"
In the section filter add your custom filter:
Start services locally using Docker Compose:
You can also run all services in the background by adding the -d flag.
Give Kibana about a minute to initialize, then access the Kibana web UI by opening http://localhost:5601 in a web browser and use the default credentials to log in:
Navigate by the left sidebar to Managment/Stack Management/Index Patterns. You will be prompted to create an index pattern. Enter logstash-* to match Logstash indices then, on the next page, select @timestamp as the time filter field. Finally, click Create index pattern and return to the Discover view to inspect your log entries.
Index may take time, because hybris logs usualy aren’t small.
Just use my preconfigured version of ELK-Stack for SAP Commerce.
- Clone the repository
git clone https://github.com/AARomanov1985/ELK-plus-SAP-Commerce-Hybris
- Set your hybris_log path in docker-compose.yml in the section logstash.volumes:
For exmaple it could be:
- Run containers: