Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ELK Stack for runtime log processing. #4570

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -180,3 +180,6 @@ debug_external: clean

build_localnet_validator:
bash test/build-localnet-validator.sh

elk:
docker-compose -f scripts/elk/docker-compose.yml up
36 changes: 36 additions & 0 deletions scripts/elk/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
version: '3'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.14
container_name: elasticsearch
networks:
- elastic
ports:
- "127.0.0.1:9200:9200"
- "127.0.0.1:9300:9300"
environment:
- discovery.type=single-node

kib01-test:
image: docker.elastic.co/kibana/kibana:7.17.14
container_name: kib01-test
networks:
- elastic
ports:
- "0.0.0.0:5601:5601"
environment:
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200

logstash:
image: docker.elastic.co/logstash/logstash:8.11.1
container_name: logstash-container
networks:
- elastic
volumes:
- ./logstash.conf:/usr/share/logstash/config/logstash.conf
- ../../tmp_log:/tmp_log
command: logstash -f /usr/share/logstash/config/logstash.conf

networks:
elastic:
driver: bridge
25 changes: 25 additions & 0 deletions scripts/elk/logstash.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
input {
file {
path => "/tmp_log/*/*.log"
start_position => "beginning"
sincedb_path => "/dev/null"
codec => "json"
}
}

filter {
# You can add additional filters here if needed
}

output {
stdout {
codec => rubydebug
}

# You can send the parsed logs to other outputs like Elasticsearch
# Uncomment the lines below and modify the Elasticsearch configuration
elasticsearch {
hosts => ["elasticsearch:9200"]
index => "harmony"
}
}