logstash-filter-ip2location 2.3.0 → 2.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a8c7b8743669d98650fc8d4127e79c3928ed9cd08e53ebc99abe83c558ac3c58
4
- data.tar.gz: aa45ac59325576bd3b795899ab3fea4fe0f0df94f1b27795bedcf47d613e5d1f
3
+ metadata.gz: afe979aa5f73816b4383418427c95493eb318c49f464649e6f99d9f2875789be
4
+ data.tar.gz: 6a0a4b553978aa7b16a8a9de76409a4a123d37b3472eeb3869884d685dc170c3
5
5
  SHA512:
6
- metadata.gz: cb72ff92c07aac310f3eba6dbad4eeb87d693213ec38e8b2583b879984c8eeab5b30eb377fc6fc29f8857eaeaa0ac9485341c7b23c40f32c84c11aedf106489b
7
- data.tar.gz: 50138ca65b141cd41c02e979343dac669af1b8b3ebe55d208a1def01cbea4b4970d8f03a0baae92e3178f777fa8f825bc52c137a77794fecd13a2409885a14a0
6
+ metadata.gz: fa385ec640bef0c383e418dc77ceada8cbcd5bfcc1e43175ca406bdb18281e565b1ea2c8969a231545dd2712b46bdb55a394f59b8143f4738d1b5676f457c9a5
7
+ data.tar.gz: 91c240e70faf07c36e29b504dbab6f133ee6351f8116793e04f3c6c8fa136eaebf6fab660a8bc45e20cf3c8789746715c6452dffc51bb6f270d1afac27dafb75
data/README.md CHANGED
@@ -5,6 +5,8 @@ Supported IPv4 and IPv6 address.
5
5
 
6
6
  For the methods to use IP2Location filter plugin with Elastic Stack (Elasticsearch, Filebeat, Logstash, and Kibana), please take a look on this [tutorial](https://www.ip2location.com/tutorials/how-to-use-ip2location-filter-plugin-with-elastic-stack).
7
7
 
8
+ *Note: This plugin works in Logstash 7 and Logstash 8.*
9
+
8
10
 
9
11
  ## Dependencies (IP2LOCATION BIN DATA FILE)
10
12
  This plugin requires IP2Location BIN data file to function. You may download the BIN data file at
@@ -54,7 +54,7 @@ class LogStash::Filters::IP2Location < LogStash::Filters::Base
54
54
 
55
55
  return unless filter?(event)
56
56
  if @use_cache
57
- if value = Cache.find(event, ip, @ip2locationfilter, @cache_size).get('ip2location')
57
+ if value = IP2LocationCache.find(event, ip, @ip2locationfilter, @cache_size).get('ip2location')
58
58
  event.set('ip2location', value)
59
59
  filter_matched(event)
60
60
  else
@@ -75,7 +75,7 @@ class LogStash::Filters::IP2Location < LogStash::Filters::Base
75
75
 
76
76
  end # class LogStash::Filters::IP2Location
77
77
 
78
- class OrderedHash
78
+ class IP2LocationOrderedHash
79
79
  ONE = 1
80
80
 
81
81
  attr_reader :times_queried # ip -> times queried
@@ -117,12 +117,12 @@ class OrderedHash
117
117
  end
118
118
  end
119
119
 
120
- class Cache
120
+ class IP2LocationCache
121
121
  ONE_DAY_IN_SECONDS = 86_400
122
122
 
123
123
  @cache = {} # ip -> event
124
124
  @timestamps = {} # ip -> time of caching
125
- @times_queried = OrderedHash.new # ip -> times queried
125
+ @times_queried = IP2LocationOrderedHash.new # ip -> times queried
126
126
  @mutex = Mutex.new
127
127
 
128
128
  class << self
@@ -137,7 +137,7 @@ class Cache
137
137
  refresh_event(event, ip, filter) if too_old?(ip)
138
138
  else
139
139
  if cache_full?(cache_size)
140
- make_room
140
+ make_room
141
141
  end
142
142
  cache_event(event, ip, filter)
143
143
  end
@@ -1,3 +1,3 @@
1
1
  require 'jar_dependencies'
2
- require_jar('com.ip2location.ip2location', 'ip2location', '8.7.0')
3
- require_jar('org.logstash.filters', 'logstash-filter-ip2location', '2.3.0')
2
+ require_jar('com.ip2location.ip2location', 'ip2location', '8.9.1')
3
+ require_jar('org.logstash.filters', 'logstash-filter-ip2location', '2.3.2')
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-filter-ip2location'
4
- s.version = '2.3.0'
4
+ s.version = '2.3.2'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Logstash filter IP2Location"
7
7
  s.description = "IP2Location filter plugin for Logstash enables Logstash's users to add geolocation information such as country, state, city, latitude, longitude, ZIP code, time zone, ISP, domain name, connection speed, IDD code, area code, weather station code, weather station name, MNC, MCC, mobile brand, elevation and usage type by IP address."
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-ip2location
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - IP2Location
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-07 00:00:00.000000000 Z
11
+ date: 2022-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logstash-core-plugin-api
@@ -57,15 +57,15 @@ files:
57
57
  - spec/filters/ip2location_spec.rb
58
58
  - spec/spec_helper.rb
59
59
  - vendor/IP2LOCATION-LITE-DB1.IPV6.BIN
60
- - vendor/jar-dependencies/com/ip2location/ip2location/ip2location/8.7.0/ip2location-8.7.0.jar
61
- - vendor/jar-dependencies/org/logstash/filters/logstash-filter-ip2location/2.3.0/logstash-filter-ip2location-2.3.0.jar
60
+ - vendor/jar-dependencies/com/ip2location/ip2location/ip2location/8.9.1/ip2location-8.9.1.jar
61
+ - vendor/jar-dependencies/org/logstash/filters/logstash-filter-ip2location/2.3.2/logstash-filter-ip2location-2.3.2.jar
62
62
  homepage: https://www.ip2location.com
63
63
  licenses:
64
64
  - Apache License (2.0)
65
65
  metadata:
66
66
  logstash_plugin: 'true'
67
67
  logstash_group: filter
68
- post_install_message:
68
+ post_install_message:
69
69
  rdoc_options: []
70
70
  require_paths:
71
71
  - lib
@@ -81,9 +81,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  requirements: []
84
- rubyforge_project:
85
- rubygems_version: 2.7.6.2
86
- signing_key:
84
+ rubygems_version: 3.3.7
85
+ signing_key:
87
86
  specification_version: 4
88
87
  summary: Logstash filter IP2Location
89
88
  test_files: