logstash-filter-geoip 4.0.0-java → 4.0.2-java

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a0d593eaa0190aff6047ca64ff4ef20e7978d5cb
4
- data.tar.gz: c2038e7fbd83c2bed569db62a2e9978fd9279eb7
3
+ metadata.gz: 9f13120363bb69c49ced50e21a083ce05fae4eb0
4
+ data.tar.gz: 4ab25721807a2ca70b8e6ce215b651f061caae92
5
5
  SHA512:
6
- metadata.gz: 4637a333526e7117f25c5bf51e165969893a845f1e7ee99dbd2011165f4ef08ab9b882e8ed30ae1a7d62560b3adef856ae7d92528665be5169c28e9bd071621a
7
- data.tar.gz: 0c07f47a558b6e9d065341b50057dee4348984724b58903a9607c618bb4c4888f31117d9bc9251d315a32f3990981f30380ac535270608a6f281656a76496e77
6
+ metadata.gz: bb80518242aa909037d97a028456f9e06bdb246a7ac59f6977338bc8d3b416c6348b268be92e7168478cf7a474ddce4f3cc295dfaee158913147a545d394d3a1
7
+ data.tar.gz: 08bbc4c80d99f87a74c57f74e5324a6a1b7b8fc2c651d36c8f094e9ea7f8ce4b89448eea2a9ced3fa14a25ad6e445ff42bb9b253cb1bd04f2e7f00029558325e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 4.0.2
2
+ - Recreate gem since 4.0.1 lacked jars
3
+
4
+ ## 4.0.1
5
+ - Relax constraint on logstash-core-plugin-api to >= 1.60 <= 2.99
6
+
1
7
  ## 4.0.0
2
8
  - Update the plugin to the version 2.0 of the plugin api, this change is required for Logstash 5.0 compatibility. See https://github.com/elastic/logstash/issues/5141
3
9
  - GA release for GeoIP2 database, compatible with LS 5.x
@@ -31,10 +31,10 @@ module JavaIO
31
31
  end
32
32
 
33
33
 
34
- # The GeoIP2 filter adds information about the geographical location of IP addresses,
35
- # based on data from the Maxmind database.
34
+ # The GeoIP filter adds information about the geographical location of IP addresses,
35
+ # based on data from the Maxmind GeoLite2 database.
36
36
  #
37
- # Starting with version 1.3.0 of Logstash, a `[geoip][location]` field is created if
37
+ # A `[geoip][location]` field is created if
38
38
  # the GeoIP lookup returns a latitude and longitude. The field is stored in
39
39
  # http://geojson.org/geojson-spec.html[GeoJSON] format. Additionally,
40
40
  # the default Elasticsearch template provided with the
@@ -46,14 +46,16 @@ end
46
46
  # and the flexibility of having GeoJSON for all other applications (like Kibana's
47
47
  # map visualization).
48
48
  #
49
- # This product includes GeoLite2 data created by MaxMind, available from
50
- # <http://dev.maxmind.com/geoip/geoip2/geolite2/>.
49
+ # Note: This product includes GeoLite2 data created by MaxMind, available from
50
+ # http://www.maxmind.com. This database is licensed under
51
+ # http://creativecommons.org/licenses/by-sa/4.0/[Creative Commons Attribution-ShareAlike 4.0 International License]
52
+
51
53
  class LogStash::Filters::GeoIP < LogStash::Filters::Base
52
54
  config_name "geoip"
53
55
 
54
- # The path to the GeoIP2 database file which Logstash should use. Only City database is supported by now.
56
+ # The path to the GeoLite2 database file which Logstash should use. Only City database is supported by now.
55
57
  #
56
- # If not specified, this will default to the GeoLiteCity database that ships
58
+ # If not specified, this will default to the GeoLite2 City database that ships
57
59
  # with Logstash.
58
60
  config :database, :validate => :path
59
61
 
@@ -66,7 +68,7 @@ class LogStash::Filters::GeoIP < LogStash::Filters::Base
66
68
  # Possible fields depend on the database type. By default, all geoip fields
67
69
  # are included in the event.
68
70
  #
69
- # For the built-in GeoLiteCity database, the following are available:
71
+ # For the built-in GeoLite2 City database, the following are available:
70
72
  # `city_name`, `continent_code`, `country_code2`, `country_code3`, `country_name`,
71
73
  # `dma_code`, `ip`, `latitude`, `longitude`, `postal_code`, `region_name` and `timezone`.
72
74
  config :fields, :validate => :array, :default => ['city_name', 'continent_code',
@@ -76,15 +78,15 @@ class LogStash::Filters::GeoIP < LogStash::Filters::Base
76
78
  'region_code', 'timezone', 'location']
77
79
 
78
80
  # Specify the field into which Logstash should store the geoip data.
79
- # This can be useful, for example, if you have `src\_ip` and `dst\_ip` fields and
81
+ # This can be useful, for example, if you have `src_ip` and `dst_ip` fields and
80
82
  # would like the GeoIP information of both IPs.
81
83
  #
82
84
  # If you save the data to a target field other than `geoip` and want to use the
83
- # `geo\_point` related functions in Elasticsearch, you need to alter the template
85
+ # `geo_point` related functions in Elasticsearch, you need to alter the template
84
86
  # provided with the Elasticsearch output and configure the output to use the
85
87
  # new template.
86
88
  #
87
- # Even if you don't use the `geo\_point` mapping, the `[target][location]` field
89
+ # Even if you don't use the `geo_point` mapping, the `[target][location]` field
88
90
  # is still valid GeoJSON.
89
91
  config :target, :validate => :string, :default => 'geoip'
90
92
 
@@ -140,7 +142,7 @@ class LogStash::Filters::GeoIP < LogStash::Filters::Base
140
142
  begin
141
143
  @parser = DatabaseReader::Builder.new(db_file).withCache(CHMCache.new(@cache_size)).build();
142
144
  rescue Java::ComMaxmindDb::InvalidDatabaseException => e
143
- @logger.error("The Geoip2 MMDB database provided is invalid or corrupted.", :exception => e, :field => @source)
145
+ @logger.error("The GeoLite2 MMDB database provided is invalid or corrupted.", :exception => e, :field => @source)
144
146
  raise e
145
147
  end
146
148
  end
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-filter-geoip'
4
- s.version = '4.0.0'
4
+ s.version = '4.0.2'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "$summary"
7
7
  s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
  s.platform = "java"
13
13
 
14
14
  # Files
15
- s.files = Dir['lib/**/*','spec/**/*','vendor/**/*','*.gemspec','*.md','CONTRIBUTORS','Gemfile','LICENSE','NOTICE.TXT']
15
+ s.files = Dir['lib/**/*','spec/**/*','vendor/**/*','*.gemspec','*.md','CONTRIBUTORS','Gemfile','LICENSE','NOTICE.TXT', 'maxmind-db-NOTICE.txt']
16
16
 
17
17
  # Tests
18
18
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
21
21
  s.metadata = { "logstash_plugin" => "true", "logstash_group" => "filter" }
22
22
 
23
23
  # Gem dependencies
24
- s.add_runtime_dependency "logstash-core-plugin-api", "~> 2.0"
24
+ s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99"
25
25
 
26
26
  s.requirements << "jar com.maxmind.geoip2:geoip2, 2.5.0, :exclusions=> [com.google.http-client:google-http-client]"
27
27
 
@@ -0,0 +1,4 @@
1
+ This product includes GeoLite2 data created by MaxMind, available from
2
+ <a href="http://www.maxmind.com">http://www.maxmind.com</a>.
3
+
4
+ The GeoLite2 databases are distributed under the Creative Commons Attribution-ShareAlike 4.0 International License
@@ -188,7 +188,7 @@ describe LogStash::Filters::GeoIP do
188
188
  end
189
189
 
190
190
  context "when a IP is not found in the DB" do
191
- let(:ipstring) { "113.208.89.21" }
191
+ let(:ipstring) { "0.0.0.0" }
192
192
 
193
193
  it "should set the target field to an empty hash" do
194
194
  expect(event.get("geoip")).to eq({})
Binary file
metadata CHANGED
@@ -1,33 +1,39 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-geoip
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.0.2
5
5
  platform: java
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-11 00:00:00.000000000 Z
11
+ date: 2016-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
- - - ~>
16
+ - - ">="
17
17
  - !ruby/object:Gem::Version
18
- version: '2.0'
18
+ version: '1.60'
19
+ - - "<="
20
+ - !ruby/object:Gem::Version
21
+ version: '2.99'
19
22
  name: logstash-core-plugin-api
20
23
  prerelease: false
21
24
  type: :runtime
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - ~>
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '1.60'
30
+ - - "<="
25
31
  - !ruby/object:Gem::Version
26
- version: '2.0'
32
+ version: '2.99'
27
33
  - !ruby/object:Gem::Dependency
28
34
  requirement: !ruby/object:Gem::Requirement
29
35
  requirements:
30
- - - '>='
36
+ - - ">="
31
37
  - !ruby/object:Gem::Version
32
38
  version: '0'
33
39
  name: jar-dependencies
@@ -35,13 +41,13 @@ dependencies:
35
41
  type: :development
36
42
  version_requirements: !ruby/object:Gem::Requirement
37
43
  requirements:
38
- - - '>='
44
+ - - ">="
39
45
  - !ruby/object:Gem::Version
40
46
  version: '0'
41
47
  - !ruby/object:Gem::Dependency
42
48
  requirement: !ruby/object:Gem::Requirement
43
49
  requirements:
44
- - - ~>
50
+ - - "~>"
45
51
  - !ruby/object:Gem::Version
46
52
  version: '3.3'
47
53
  name: ruby-maven
@@ -49,13 +55,13 @@ dependencies:
49
55
  type: :development
50
56
  version_requirements: !ruby/object:Gem::Requirement
51
57
  requirements:
52
- - - ~>
58
+ - - "~>"
53
59
  - !ruby/object:Gem::Version
54
60
  version: '3.3'
55
61
  - !ruby/object:Gem::Dependency
56
62
  requirement: !ruby/object:Gem::Requirement
57
63
  requirements:
58
- - - '>='
64
+ - - ">="
59
65
  - !ruby/object:Gem::Version
60
66
  version: '0'
61
67
  name: logstash-devutils
@@ -63,7 +69,7 @@ dependencies:
63
69
  type: :development
64
70
  version_requirements: !ruby/object:Gem::Requirement
65
71
  requirements:
66
- - - '>='
72
+ - - ">="
67
73
  - !ruby/object:Gem::Version
68
74
  version: '0'
69
75
  description: This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program
@@ -86,6 +92,7 @@ files:
86
92
  - lib/logstash-filter-geoip_jars.rb
87
93
  - lib/logstash/filters/geoip.rb
88
94
  - logstash-filter-geoip.gemspec
95
+ - maxmind-db-NOTICE.txt
89
96
  - spec/filters/geoip_spec.rb
90
97
  - vendor/GeoLite2-City.mmdb
91
98
  - vendor/jar-dependencies/runtime-jars/geoip2-2.5.0.jar
@@ -105,20 +112,20 @@ require_paths:
105
112
  - lib
106
113
  required_ruby_version: !ruby/object:Gem::Requirement
107
114
  requirements:
108
- - - '>='
115
+ - - ">="
109
116
  - !ruby/object:Gem::Version
110
117
  version: '0'
111
118
  required_rubygems_version: !ruby/object:Gem::Requirement
112
119
  requirements:
113
- - - '>='
120
+ - - ">="
114
121
  - !ruby/object:Gem::Version
115
122
  version: '0'
116
123
  requirements:
117
124
  - jar com.maxmind.geoip2:geoip2, 2.5.0, :exclusions=> [com.google.http-client:google-http-client]
118
125
  rubyforge_project:
119
- rubygems_version: 2.4.5
126
+ rubygems_version: 2.6.3
120
127
  signing_key:
121
128
  specification_version: 4
122
- summary: $summary
129
+ summary: "$summary"
123
130
  test_files:
124
131
  - spec/filters/geoip_spec.rb