首页 > 代码库 > logstash插件

logstash插件

codec 插件   goeip插件

input {

    file {

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

    type =>"type"

    start_position => "end"

    codec => json

   }

 

filter {

  goeip {

    source => "client"

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

  }

}

 

output {

    elasticsearch {

        hosts => "127.0.0.1:9200"

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

  }

}

logstash插件