logstash-filter-ip2location 2.3.1 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/logstash/filters/ip2location.rb +5 -5
- data/lib/logstash-filter-ip2location_jars.rb +1 -1
- data/logstash-filter-ip2location.gemspec +1 -1
- data/vendor/jar-dependencies/org/logstash/filters/logstash-filter-ip2location/2.3.2/logstash-filter-ip2location-2.3.2.jar +0 -0
- metadata +4 -4
- data/vendor/jar-dependencies/org/logstash/filters/logstash-filter-ip2location/2.3.1/logstash-filter-ip2location-2.3.1.jar +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: afe979aa5f73816b4383418427c95493eb318c49f464649e6f99d9f2875789be
|
4
|
+
data.tar.gz: 6a0a4b553978aa7b16a8a9de76409a4a123d37b3472eeb3869884d685dc170c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa385ec640bef0c383e418dc77ceada8cbcd5bfcc1e43175ca406bdb18281e565b1ea2c8969a231545dd2712b46bdb55a394f59b8143f4738d1b5676f457c9a5
|
7
|
+
data.tar.gz: 91c240e70faf07c36e29b504dbab6f133ee6351f8116793e04f3c6c8fa136eaebf6fab660a8bc45e20cf3c8789746715c6452dffc51bb6f270d1afac27dafb75
|
@@ -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 =
|
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
|
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
|
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 =
|
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,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-filter-ip2location'
|
4
|
-
s.version = '2.3.
|
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."
|
Binary file
|
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.
|
4
|
+
version: 2.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- IP2Location
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
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
|
@@ -58,7 +58,7 @@ files:
|
|
58
58
|
- spec/spec_helper.rb
|
59
59
|
- vendor/IP2LOCATION-LITE-DB1.IPV6.BIN
|
60
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.
|
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)
|
@@ -81,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
requirements: []
|
84
|
-
rubygems_version: 3.
|
84
|
+
rubygems_version: 3.3.7
|
85
85
|
signing_key:
|
86
86
|
specification_version: 4
|
87
87
|
summary: Logstash filter IP2Location
|