Last active
July 8, 2019 01:34
-
-
Save vector4wang/dcc129ead42263fb82c4d5c39d40b7a8 to your computer and use it in GitHub Desktop.
[Logstash 每次从头读文件] #Logstash
This file contains 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
input { | |
file { | |
path => ["/data/test.log"] | |
start_position => "beginning" | |
sincedb_path => "/dev/null" ## 主要是这句,sincedb_path 会将每次读取的数据做标识存进日志中,如果日志为空,则认为是最新的数据 | |
} | |
} | |
output { | |
stdout { | |
codec => rubydebug | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment