logstash-filter-wurfl_device_detection 0.3.4 → 0.4.0
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/CHANGELOG.md +2 -0
- data/README.md +48 -4
- data/VERSION +1 -1
- data/lib/logstash-filter-wurfl_device_detection_jars.rb +1 -1
- data/vendor/jar-dependencies/com/scientiamobile/logstash/logstash-filter-wurfl_device_detection/{0.3.4/logstash-filter-wurfl_device_detection-0.3.4.jar → 0.4.0/logstash-filter-wurfl_device_detection-0.4.0.jar} +0 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2168139619cce611e9e955b5f3eb575cbb3720699137ff83e7706af4c92b7c4c
|
4
|
+
data.tar.gz: 005aa079e3e9b0d7fdf0a46ca83e604f23a89a10769d202d0baf828078eb82af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f763e50ca546c2167fc1b5d89ccce4e628170ccb6f331448765b922ad0a386962dd1ad785a69e78bcbae99cd764b84faf46d621f35cdc63723e14724c9b1ab6
|
7
|
+
data.tar.gz: d21a9e70ee6981d3f8659e6bfe313516a177706a299eb63c6410e3188f65d17f978b631aeafc59005c7ba5598d28d02bac5aef69c4a16766180a4ad55261ec17
|
data/CHANGELOG.md
CHANGED
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
|
-
|
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.
|
1
|
+
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.
|
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-
|
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.
|
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
|