logstash-filter-wurfl_device_detection 0.3.4 → 0.4.0

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: f636e0ec48c5431a30aa59f1e1e85191ab2985639f18cc8ce1b30b38c325e0b3
4
- data.tar.gz: 626f1dfae8bab9d541d72850c5d6f34831c92f8a3ad4ce7f604e0dbd2371335f
3
+ metadata.gz: 2168139619cce611e9e955b5f3eb575cbb3720699137ff83e7706af4c92b7c4c
4
+ data.tar.gz: 005aa079e3e9b0d7fdf0a46ca83e604f23a89a10769d202d0baf828078eb82af
5
5
  SHA512:
6
- metadata.gz: 42aff0f5139a4215f724479ba1d11bb17c5fb9e0a690580a07cbf950acf0c9186882ae16dc8939a5433c2d1245cf7f9374c9a23149048db7faf05defe7c5ca2e
7
- data.tar.gz: c8cf61ba8d3405e3016458233cb83f0ea12d7f7fc57817bf0ebc4a69864cfdf105dff50221ea4051759a5ee35cd692f0aa9a29e8247aab0b5c304caacae1551c
6
+ metadata.gz: 4f763e50ca546c2167fc1b5d89ccce4e628170ccb6f331448765b922ad0a386962dd1ad785a69e78bcbae99cd764b84faf46d621f35cdc63723e14724c9b1ab6
7
+ data.tar.gz: d21a9e70ee6981d3f8659e6bfe313516a177706a299eb63c6410e3188f65d17f978b631aeafc59005c7ba5598d28d02bac5aef69c4a16766180a4ad55261ec17
@@ -1,3 +1,5 @@
1
+ - 0.4.0 - now support for array of events
2
+
1
3
  - 0.3.4 - added gemspec file, fixed naming convention issues
2
4
 
3
5
  - 0.3.3 - Better description of WM pre requisites in rubygem.org deploy
data/README.md CHANGED
@@ -46,11 +46,57 @@ output {
46
46
  stdout { codec => rubydebug }
47
47
  }
48
48
  ```
49
+
50
+ The http input plugin receives an http request to the specified host and port, with a payload map that contains the HTTP headers that the WURFL plugin will analyze.
51
+ Note that the `source` name is `headers`. Also note that you can configure the logstash input as you want,
52
+ but if you want the WURFL plugin to work with headers, you must configure it so that it uses an header map.
53
+
54
+ ### Example configuration - using JSON input and filter plugins to receive HTTP request data
55
+ Scenario: we configure logstash to receive HTTP request information from one or more JSON files (needs logstash-filter-json plugin).
56
+
57
+ ```
58
+ input {
59
+ file {
60
+ type => "json"
61
+ path => "<path to>/logstash-filter-wurfl/sample_input/kafka_events_mini.json"
62
+ start_position => "beginning"
63
+ }
64
+ }
65
+ filter {
66
+ json {
67
+ source => "message"
68
+ }
69
+ }
70
+ filter {
71
+ wurfl_device_detection {
72
+ source => "message"
73
+ cache_size => 300000
74
+ inject_wurfl_id => true
75
+ inject_wurfl_info => false
76
+ inject_wurfl_api_version => false
77
+ # commenting the capabilities config, you get them all
78
+ #static_capabilities => ["model_name", "brand_name"]
79
+ #virtual_capabilities => ["form_factor"]
80
+ scheme => "http"
81
+ host => "localhost"
82
+ port => "8080"
83
+ }
84
+ }
85
+ output {
86
+ # you may choose whatever output you want
87
+ stdout { codec => rubydebug }
88
+ }
89
+ ```
90
+
91
+ Source field "message" is the root element of the json file
92
+
93
+ ### Starting logstash
94
+
49
95
  Start the WURFL Microservice server on AWS/Azure/Docker then, let's run logstash:
50
96
 
51
97
  `./logstash -f <path_to_configuration>.conf>`
52
98
 
53
- sending a HTTP request to its configured port (in this case 19080) like this (we just add the user-agent header for simplicity):
99
+ in case you choose the HTTP input configuration, sending a HTTP request to its configured port (in this case 19080) like this (we just add the user-agent header for simplicity, but you can send all headers using the -H flag):
54
100
 
55
101
  `curl -H "User-Agent: Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3359.139 Mobile Safari/537.36" http://localhost:19080`
56
102
 
@@ -105,9 +151,7 @@ we'll get an output that looks like this:
105
151
 
106
152
  ```
107
153
 
108
- The http input plugin receives an http request to the specified host and port, with a payload map that contains the HTTP headers that the WURFL plugin will analyze.
109
- Note that the `source` name is `headers`. Also note that you can configure the logstash input as you want,
110
- but if you want the WURFL plugin to work with headers, you must configure it so that it uses an header map.
154
+ In case you chose the JSON input file configuration, logstash will automatically parse it and print the output.
111
155
 
112
156
  - `stdin` and `stdout` define which input and output plugin will be used: in our scenario
113
157
  we use the HTTP input plugin, while we use the ruby debug console as output.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.4
1
+ 0.4.0
@@ -2,4 +2,4 @@
2
2
  # encoding: utf-8
3
3
 
4
4
  require 'jar_dependencies'
5
- require_jar('com.scientiamobile.logstash', 'logstash-filter-wurfl_device_detection', '0.3.4')
5
+ require_jar('com.scientiamobile.logstash', 'logstash-filter-wurfl_device_detection', '0.4.0')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-wurfl_device_detection
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ScientiaMobile Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-07 00:00:00.000000000 Z
11
+ date: 2020-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -79,7 +79,7 @@ files:
79
79
  - lib/logstash-filter-wurfl_device_detection_jars.rb
80
80
  - lib/logstash/filters/wurfl_device_detection.rb
81
81
  - logstash-filter-wurfl_device_detection.gemspec
82
- - vendor/jar-dependencies/com/scientiamobile/logstash/logstash-filter-wurfl_device_detection/0.3.4/logstash-filter-wurfl_device_detection-0.3.4.jar
82
+ - vendor/jar-dependencies/com/scientiamobile/logstash/logstash-filter-wurfl_device_detection/0.4.0/logstash-filter-wurfl_device_detection-0.4.0.jar
83
83
  homepage: http://www.scientiamobile.com
84
84
  licenses:
85
85
  - Apache-2.0