Created
June 30, 2020 15:08
-
-
Save hitenpratap/ec4356ae4d75a7bf5ba55f9fc906a579 to your computer and use it in GitHub Desktop.
Fluentd Config File
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<source> | |
type tail | |
format multiline | |
format_firstline /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}/ | |
format1 /^(?<datetime>[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}) (?<Thread>\[(.*?)\]) (?<Log-Level>[A-Z]*) (?<Logger>(.+?(?=))) (?<separator>(-)) (?<message>.*)$/ | |
path /log/application-backend-dev.log | |
pos_file /log/pos/application-backend-dev-multiline.pos | |
tag spring-boot-logs | |
</source> | |
<filter spring-boot-logs> | |
type record_transformer | |
<record> | |
hostname ${hostname} | |
</record> | |
</filter> | |
<match spring-boot-logs> | |
type elasticsearch | |
host localhost | |
port 9200 | |
logstash_format true | |
logstash_prefix spring-boot-logs | |
flush_interval 5s | |
</match> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment