Documentation ¶
Index ¶
Constants ¶
View Source
const ErrorTag = "gogstash_filter_ip2location_error"
ErrorTag tag added to event when process ip2location failed
View Source
const ModuleName = "ip2location"
ModuleName is the name used in config file
Variables ¶
View Source
var DefaultCIDR = []string{
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"172.16.0.0/12",
"192.168.0.0/16",
"fc00::/7",
"fe80::/10",
"169.254.0.0/16",
}
DefaultCIDR is the default list of CIDRs to filter out
Functions ¶
Types ¶
type FilterConfig ¶
type FilterConfig struct { config.FilterConfig DBPath string `json:"db_path" yaml:"db_path"` // ip2location .BIN file IPField string `json:"ip_field" yaml:"ip_field"` // IP field to get geolocation for Key string `json:"key"` // destination field name QuietFail bool `json:"quiet" yaml:"quiet"` // fail quietly SkipPrivate bool `json:"skip_private" yaml:"skip_private"` // skip private IP addresses PrivateNet []string `json:"private_net" yaml:"private_net"` // list of own defined private IP addresses CacheSize int `json:"cache_size" yaml:"cache_size"` // cache size // contains filtered or unexported fields }
FilterConfig holds the configuration json fields and internal objects
func DefaultFilterConfig ¶
func DefaultFilterConfig() FilterConfig
DefaultFilterConfig returns an FilterConfig struct with default values
Click to show internal directories.
Click to hide internal directories.