fluent-plugin-filter-geoip 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fluent-plugin-filter-geoip.gemspec +1 -1
- data/lib/fluent/plugin/filter_geoip.rb +16 -10
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5523f7842532f6fbcdbb0f53bfcfc6aeab71472
|
4
|
+
data.tar.gz: 9a9b2fcc94bbdbb17dde860b8d2aac6b9cda64e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6dd32a6bd3699dbbef1dfe2da3ba581e2b936ceef1f268583fa759b8d35521e8951193434b6ac563c41ecd995ec2f95ca1451feae220ae0bcd281aee0e87bcd
|
7
|
+
data.tar.gz: 635c1a0fc6fdfcdff9120282fa43f17f9b0649b0653ac23a75b9114ab1ce859c3c8349c9549930b8b245d1939338e9b8695bb54aee97c7862e27cdf8b75eadbf
|
@@ -119,6 +119,7 @@ module Fluent
|
|
119
119
|
end
|
120
120
|
|
121
121
|
if geoip.found? then
|
122
|
+
record.merge!({@output_field => {}})
|
122
123
|
if @continent then
|
123
124
|
continent_hash = {}
|
124
125
|
|
@@ -139,7 +140,7 @@ module Fluent
|
|
139
140
|
if @flatten then
|
140
141
|
record.merge!(to_flatten(continent_hash, [@output_field, 'continent'], @field_delimiter))
|
141
142
|
else
|
142
|
-
record[
|
143
|
+
record[@output_field].merge!({'continent' => continent_hash})
|
143
144
|
end
|
144
145
|
end
|
145
146
|
end
|
@@ -164,7 +165,7 @@ module Fluent
|
|
164
165
|
if @flatten then
|
165
166
|
record.merge!(to_flatten(country_hash, [@output_field, 'country'], @field_delimiter))
|
166
167
|
else
|
167
|
-
record[
|
168
|
+
record[@output_field].merge!({'country' => country_hash})
|
168
169
|
end
|
169
170
|
end
|
170
171
|
end
|
@@ -189,7 +190,7 @@ module Fluent
|
|
189
190
|
if @flatten then
|
190
191
|
record.merge!(to_flatten(city_hash, [@output_field, 'city'], @field_delimiter))
|
191
192
|
else
|
192
|
-
record[
|
193
|
+
record[@output_field].merge!({'city' => city_hash})
|
193
194
|
end
|
194
195
|
end
|
195
196
|
end
|
@@ -214,7 +215,7 @@ module Fluent
|
|
214
215
|
if @flatten then
|
215
216
|
record.merge!(to_flatten(location_hash, [@output_field, 'location'], @field_delimiter))
|
216
217
|
else
|
217
|
-
record[
|
218
|
+
record[@output_field].merge!({'location' => location_hash})
|
218
219
|
end
|
219
220
|
end
|
220
221
|
end
|
@@ -230,7 +231,7 @@ module Fluent
|
|
230
231
|
if @flatten then
|
231
232
|
record.merge!(to_flatten(postal_hash, [@output_field, 'postal'], @field_delimiter))
|
232
233
|
else
|
233
|
-
record[
|
234
|
+
record[@output_field].merge!({'postal' => postal_hash})
|
234
235
|
end
|
235
236
|
end
|
236
237
|
end
|
@@ -255,7 +256,7 @@ module Fluent
|
|
255
256
|
if @flatten then
|
256
257
|
record.merge!(to_flatten(registered_country_hash, [@output_field, 'registered_country'], @field_delimiter))
|
257
258
|
else
|
258
|
-
record[
|
259
|
+
record[@output_field].merge!({'registered_country' => registered_country_hash})
|
259
260
|
end
|
260
261
|
end
|
261
262
|
end
|
@@ -280,7 +281,7 @@ module Fluent
|
|
280
281
|
if @flatten then
|
281
282
|
record.merge!(to_flatten(represented_country_hash, [@output_field, 'represented_country'], @field_delimiter))
|
282
283
|
else
|
283
|
-
record[
|
284
|
+
record[@output_field].merge!({'represented_country' => represented_country_hash})
|
284
285
|
end
|
285
286
|
end
|
286
287
|
end
|
@@ -320,7 +321,7 @@ module Fluent
|
|
320
321
|
i = i + 1
|
321
322
|
end
|
322
323
|
else
|
323
|
-
record[
|
324
|
+
record[@output_field].merge!({'subdivisions' => subdivision_arry})
|
324
325
|
end
|
325
326
|
end
|
326
327
|
end
|
@@ -339,14 +340,19 @@ module Fluent
|
|
339
340
|
if @flatten then
|
340
341
|
record.merge!(to_flatten(traits_hash, [@output_field, 'traits'], @field_delimiter))
|
341
342
|
else
|
342
|
-
record[
|
343
|
+
record[@output_field].merge!({'traits' => traits_hash})
|
343
344
|
end
|
344
345
|
end
|
345
346
|
end
|
346
347
|
|
347
348
|
if @connection_type then
|
348
349
|
unless geoip.connection_type.nil? then
|
349
|
-
|
350
|
+
if @flatten then
|
351
|
+
#record[[@output_field, 'connection_type'].join(@field_delimiter)] = geoip.connection_type
|
352
|
+
record.merge!(to_flatten(geoip.connection_type, [@output_field, 'connection_type'], @field_delimiter))
|
353
|
+
else
|
354
|
+
record[@output_field].merge!({'connection_type' => geoip.connection_type})
|
355
|
+
end
|
350
356
|
end
|
351
357
|
end
|
352
358
|
|