Sha256: cabb232c8ece6d3d69e0af40c642f2d5b4bd0633a9bc6413edc216825bbd2fda
Contents?: true
Size: 819 Bytes
Versions: 1
Compression:
Stored size: 819 Bytes
Contents
module Fluent class GeoipFilter < Filter Plugin.register_filter('geoip', self) config_param :geoip_database, :string, :default => File.dirname(__FILE__) + '/../../../data/GeoLiteCity.dat' config_param :geoip_lookup_key, :string, :default => 'host' config_param :skip_adding_null_record, :bool, :default => false config_set_default :include_tag_key, false config_param :hostname_command, :string, :default => 'hostname' config_param :flush_interval, :time, :default => 0 config_param :log_level, :string, :default => 'warn' def initialize require 'fluent/plugin/geoip' super end def configure(conf) super @geoip = Fluent::GeoIP.new(self, conf) end def filter(tag, time, record) @geoip.add_geoip_field(record) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fluent-plugin-geoip-0.6.0 | lib/fluent/plugin/filter_geoip.rb |