输出的json文件应采用以下格式,并应发送到Websocket服务器:
{
"id" : "test"
"type": "applogs"
"data": "this will be in GREEDYDATA"
}
我正在尝试使用类似logstash的配置文件,但它不起作用:
input
{
gelf {}
}
filter
{
grok
{
match => { "message" => "%{GREEDYDATA:data}"}
}
}
output
{
websocket
{
host => "wss://some-site/ws/test"
id => "test"
type => "applogs"
codec => json {}
}
stdout
{
codec => rubydebug
}
}