logstash输出到事件的根(顶级)

时间:2015-06-11 09:45:44

标签: logstash

使用此设置时:

geoip 
{
    source => "ipv4_dst_addr"
}

它将显示如下:

{
"ipv4_dst_addr" => 180.76.15.31,
"geoip" => {
    "country_name" => Hong Kong,
    "city_name" => Hongkong,
    "latitude" => 22.25,
    "longitude" => 114.16669999999999,
    "location" => [
        [0] 114.16669999999999,
        [1] 22.25
    ],
    "isp" => Baidu,
    "asn" => AS55967
}

我如何修改配置,我将按照以下方式打印:

{
"ipv4_dst_addr" => 180.76.15.31,
"country_name" => Hong Kong,
"city_name" => Hongkong,
"latitude" => 22.25,
"longitude" => 114.16669999999999,
"location" => [
    [0] 114.16669999999999,
    [1] 22.25
],
    "isp" => Baidu,
   "asn" => AS55967
}

感谢。

0 个答案:

没有答案