🏗️」 wip: logstash workinnnggg

This commit is contained in:
2025-07-26 10:31:26 +02:00
parent 8982e72969
commit f1d54de6a5
19 changed files with 95 additions and 1 deletions

4
docker/ELK/compose.yml Normal file
View File

@ -0,0 +1,4 @@
include:
- ./logstash/compose.yml
# - ./kibana/compose.yml
# - ./elasticsearch/compose.yml

View File

@ -0,0 +1,3 @@
FROM docker.elastic.co/elasticsearch/elasticsearch-wolfi:9.0.3
COPY --chown=elasticsearch:elasticsearch elasticsearch.yml /usr/share/elasticsearch/config/

View File

@ -0,0 +1,10 @@
services:
elasticsearch:
container_name: transcendence-elasticsearch
build:
dockerfile: Dockerfile
context: .
environment:
- LOG_LEVEL=info
- ELASTIC_PASSWORD=${ELASTIC_PASSWORD}
mem_limit: 1gb

View File

@ -0,0 +1 @@
FROM kibana:9.0.3

View File

View File

@ -0,0 +1,6 @@
FROM docker.elastic.co/logstash/logstash-wolfi:9.0.3
RUN rm -f /usr/share/logstash/pipeline/logstash.conf
COPY --chmod=777 pipeline/ /usr/share/logstash/pipeline/
COPY --chmod=777 config/ /usr/share/logstash/config/

View File

@ -0,0 +1,14 @@
services:
logstash:
container_name: transcendence-logstash
build:
dockerfile: Dockerfile
context: .
volumes:
- log-user:/var/log/user-api
- log-auth:/var/log/auth-api
- log-nginx:/var/log/nginx
environment:
- LOG_LEVEL=info
networks:
- elk

View File

@ -0,0 +1,2 @@
api:
environment: production

View File

@ -0,0 +1,27 @@
input {
file {
path => "/var/log/user-api/log.log"
start_position => "beginning"
tags => [ "api", "user" ]
}
file {
path => "/var/log/auth-api/log.log"
start_position => "beginning"
tags => [ "api", "auth" ]
}
file {
path => "/var/log/nginx/log.log"
start_position => "beginning"
tags => [ "nginx", "front" ]
}
file {
path => "/var/log/nginx/err.log"
start_position => "beginning"
tags => [ "nginx", "front", "error" ]
}
}
output {
elasticsearch { hosts => ["transcendence-elasticsearch:9200"] }
stdout { codec => rubydebug }
}