版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/sz85850597/article/details/86547196
描述
将输入的json格式内容的事件编码为json文本。例如:
input {
stdin {
codec => "json"
}
}
如果要传输由\n
分隔的json事件,请查看json_lines编码器。
效果
输入:
{"name":"tom","age":18}
输出:
{
"name" => "tom",
"@version" => "1",
"host" => "VM_0_10_centos",
"@timestamp" => 2019-01-16T14:23:13.743Z,
"age" => 18
}