我是新手到麋鹿堆栈,并试图通过http发送监控日志。我有以下logstash配置。但它只读取和发送第一行到弹性搜索,虽然我发送多个线在我的http POST请求正文(我使用chromes DHC插件发送http请求到logstash)。请帮助我阅读完整的数据并发送给弹性搜索。logstash:http输入只需要第一行(与csv过滤器)
input {
http {
host => "127.0.0.1" # default: 0.0.0.0
port => 8081 # default: 8080
threads => 10
}
}
filter {
csv {
separator => ","
columns => ["posTimestamp","posCode","logLevel","location","errCode","errDesc","detail"]
}
date {
match => ["posTimestamp", "ISO8601"]
}
mutate {
strip => ["posCode", "logLevel", "location", "errCode", "errDesc" ]
remove_field => [ "path", "message", "headers" ]
}
}
output {
elasticsearch {
protocol => "http"
host => "localhost"
index => "temp"
}
stdout {
codec => rubydebug
}
}
的样本数据: 2015-08-24T05:21:40.468,352701060205140,ERROR,科伦坡,ERR_01,INVALID_CARD,测试POS错误 2015-08-24T05:21:41.468,352701060205140,ERROR,科伦坡,ERR_01,INVALID_CARD,测试POS错误 2015-08-24T05:23:50.468,352701060205140,ERROR,Colombo,ERR_02 2015-08-24T05:23:40.468,81021320,ERROR,Colombo,ERR_01,INVALID_CARD ,TIME_OUT,测试POS错误