您的位置:首页 > Web前端 > JavaScript

json编解码

2016-09-13 11:12 399 查看
[elk@zjtest7-frontend test]$ cat json.conf
input {
stdin {
}
}

filter {
json{
source =>"message"
target =>"jsonconnect"
}
}

output {
stdout {
codec=>rubydebug{}
}
}

[elk@zjtest7-frontend test]$ ../../bin/logstash -f json.conf
Settings: Default pipeline workers: 1
Pipeline main started
{"uid":1111,"type":2222}
{
"message" => "{\"uid\":1111,\"type\":2222}",
"@version" => "1",
"@timestamp" => "2016-09-13T03:08:43.567Z",
"host" => "0.0.0.0",
"jsonconnect" => {
"uid" => 1111,
"type" => 2222
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: