input {
file {
path => "/home/nflow/logs/nisp-service/nisp-service.log"
type => "nisp-servvice"
start_position => "end"
stat_interval => "1"
type => 'nisp-servvice'
tags => ["nisp-servvice"]
codec => multiline {
pattern => "^\d"
negate => "true"
what => "previous"
}
}
}
output {
if [type] == "nisp-servvice" {
elasticsearch {
hosts => ["172.16.249.3:9400"]
index => "nisp-servvice-log-%{+YYYY.MM.dd}"
codec => "json"
}}
}
转载于:https://blog.51cto.com/wsxxsl/2369795