logstash插件

codec 插件   goeip插件

input {

    file {

    path => ["/data/nginx/logs/access.log"]

    type =>"type"

    start_position => "end"

    codec => json

   }

 

filter {

  geoip {

    source => "client"

    fields => ["ip","city_name","country_name","location"]

  }

}

 

output {

    elasticsearch {

        hosts => "127.0.0.1:9200"

        index => "logstash-%{+YYYY.MM.dd}"

  }

}

posted @ 2016-10-06 23:12  fengjian1585  阅读(216)  评论(0编辑  收藏  举报