日志文件中有1数据,2数据;当我现在插入3数据时,为何logstash获取到的是2数据。该如何做才能获取到本次插入数据3数据?
这是我的配置文件:
input {
file {
type => "accounts"
path => ["C:/logs/abc/*.log"]
codec=>plain{charset=>"UTF-8"}
}
}
filter{
json {
source => "message"
}
}
output {
redis{
codec => plain{charset=>"UTF-8"}
data_type => list
host => ["127.0.0.1:6379"]
key => mylist
}
mongodb{
collection => "ecmonitor"
database => "db"
uri => "mongodb://ip:27017"
}
}
这是我的配置文件:
input {
file {
type => "accounts"
path => ["C:/logs/abc/*.log"]
codec=>plain{charset=>"UTF-8"}
}
}
filter{
json {
source => "message"
}
}
output {
redis{
codec => plain{charset=>"UTF-8"}
data_type => list
host => ["127.0.0.1:6379"]
key => mylist
}
mongodb{
collection => "ecmonitor"
database => "db"
uri => "mongodb://ip:27017"
}
}
0 个回复