mirror of https://github.com/usbharu/Hideout.git
chore: jsonのログを見れるように
This commit is contained in:
parent
72659bf57b
commit
0dcd2b1b9a
|
@ -0,0 +1,60 @@
|
|||
version: "3"
|
||||
|
||||
services:
|
||||
db:
|
||||
image: postgres:16
|
||||
ports:
|
||||
- "5432:5432"
|
||||
environment:
|
||||
POSTGRES_USER: "postgres"
|
||||
POSTGRES_PASSWORD: "password"
|
||||
POSTGRES_DB: "hideout"
|
||||
|
||||
mongodb:
|
||||
image: mongo:7.0.14
|
||||
ports:
|
||||
- "27017:27017"
|
||||
|
||||
elasticsearch:
|
||||
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.24
|
||||
container_name: elasticsearch
|
||||
environment:
|
||||
- discovery.type=single-node
|
||||
- cluster.name=docker-cluster
|
||||
- bootstrap.memory_lock=true
|
||||
- xpack.security.enabled=true
|
||||
- xpack.monitoring.collection.enabled=true
|
||||
- ELASTIC_PASSWORD=Passw0rd
|
||||
- "ES_JAVA_OPTS=-Xms512M -Xmx512M"
|
||||
ports:
|
||||
- "9200:9200"
|
||||
volumes:
|
||||
- elasticsearch-data:/usr/share/elasticsearch/data
|
||||
restart: always
|
||||
kibana:
|
||||
image: docker.elastic.co/kibana/kibana:7.17.24
|
||||
container_name: kibana
|
||||
ports:
|
||||
- "5601:5601"
|
||||
environment:
|
||||
- ELASTICSEARCH_URL=http://elasticsearch:9200
|
||||
- ELASTICSEARCH_USERNAME=elastic
|
||||
- ELASTICSEARCH_PASSWORD=Passw0rd
|
||||
depends_on:
|
||||
- elasticsearch
|
||||
restart: always
|
||||
|
||||
fluentd:
|
||||
build: ./fluentd
|
||||
volumes:
|
||||
- ./fluentd/conf:/fluentd/etc
|
||||
- ../logs:/in
|
||||
depends_on:
|
||||
- "elasticsearch"
|
||||
ports:
|
||||
- "24224:24224"
|
||||
- "24224:24224/udp"
|
||||
|
||||
volumes:
|
||||
elasticsearch-data:
|
||||
driver: local
|
|
@ -0,0 +1,4 @@
|
|||
FROM fluent/fluentd:v1.16-debian-2
|
||||
USER root
|
||||
RUN fluent-gem install fluent-plugin-elasticsearch --no-document
|
||||
USER fluent
|
|
@ -0,0 +1,19 @@
|
|||
<source>
|
||||
@type tail
|
||||
path /in/logFile.log.json
|
||||
pos_file /in/logFile.pos
|
||||
tag hideout
|
||||
<parse>
|
||||
@type json
|
||||
</parse>
|
||||
</source>
|
||||
|
||||
<match hideout>
|
||||
@type elasticsearch
|
||||
host elasticsearch
|
||||
port 9200
|
||||
index_name logs
|
||||
include_timestamp true
|
||||
user elastic
|
||||
password Passw0rd
|
||||
</match>
|
|
@ -1,16 +0,0 @@
|
|||
version: "3"
|
||||
|
||||
services:
|
||||
db:
|
||||
image: postgres:16
|
||||
ports:
|
||||
- "5432:5432"
|
||||
environment:
|
||||
POSTGRES_USER: "postgres"
|
||||
POSTGRES_PASSWORD: "password"
|
||||
POSTGRES_DB: "hideout"
|
||||
|
||||
mongodb:
|
||||
image: mongo:7.0.14
|
||||
ports:
|
||||
- "27017:27017"
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<property name="LOG_FILE" value="logs/logFile.log"/>
|
||||
<property name="CONSOLE_LOG_THRESHOLD" value="${CONSOLE_LOG_THRESHOLD:-INFO}"/>
|
||||
<property name="CONSOLE_LOG_THRESHOLD" value="${CONSOLE_LOG_THRESHOLD:-TRACE}"/>
|
||||
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
|
||||
<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>
|
||||
<include resource="org/springframework/boot/logging/logback/file-appender.xml"/>
|
||||
|
@ -12,4 +12,8 @@
|
|||
<appender-ref ref="ECS_JSON_FILE"/>
|
||||
<appender-ref ref="FILE"/>
|
||||
</root>
|
||||
<logger name="javax.management" level="INFO"/>
|
||||
<logger name="sun.rmi.loader" level="INFO"/>
|
||||
<logger name="sun.rmi" level="INFO"/>
|
||||
<logger name="java.io.serialization" level="INFO"/>
|
||||
</configuration>
|
Loading…
Reference in New Issue