1、output 插件

input {
stdin {}
}
output{
http {
http_method => "post"
url => "http://10.10.10.10:90"
}
# stdout 是为了查看输出内容

2、input 插件

input {
http{
# 监听本机端口
host => "0.0.0.0"
port => 8081
}
}
filter {
# http 请求传入 message为空时 则删除该信息
if ([message]== "")
{
drop {}
}
else
{
grok { match => ["message", "%{USERNAME:username}"]}
}
}
output{stdout{codec => rubydebug}}

作者:jiankunking