Compare commits

...

2 Commits

Author SHA1 Message Date
frozen 897364a82a
Elk for logs. 11 months ago
frozen 2873a786fb
Elk for logs. 11 months ago
  1. 3
      Makefile
  2. 36
      scripts/elk/docker-compose.yml
  3. 25
      scripts/elk/logstash.conf

@ -180,3 +180,6 @@ debug_external: clean
build_localnet_validator: build_localnet_validator:
bash test/build-localnet-validator.sh bash test/build-localnet-validator.sh
elk:
docker-compose -f scripts/elk/docker-compose.yml up

@ -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

@ -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"
}
}
Loading…
Cancel
Save