soputasmile11
2018-01-11 03:10
采纳率: 66.7%
浏览 6.8k
已采纳

Logstash 读取日志文件,增量

input {
file {
path => "/usr/local/elk/mos-log/mt.log"
type => "mos-mt-log"
codec => multiline {
pattern => "^["
negate => true
what => "next"
}
start_position => "end"
}
file {
path => "/usr/local/elk/mos-log/rpt.log"
type => "mos-rpt-log"
codec => multiline {
pattern => "^["
negate => true
what => "next"
}
start_position => "end"
}
}

这是conf文件中的input,再我每往日志文件手动添加一条日志时,logstash总是从头读取一遍,怎么样使logstash只去读取我新添加的日志

7条回答 默认 最新

相关推荐 更多相似问题