logstash-promtail-http-input 4.1-java → 4.2-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/logstash-input-http_jars.rb +1 -1
- data/lib/logstash/inputs/http.rb +4 -4
- data/logstash-promtail-http-input.gemspec +2 -2
- data/spec/inputs/http_spec.rb +9 -0
- data/vendor/jar-dependencies/org/logstash/plugins/input/http/logstash-input-http/4.0.1/logstash-input-http-4.0.1.jar +0 -0
- data/vendor/jar-dependencies/org/logstash/plugins/input/http/logstash-promtail-http-input/1.0.0/logstash-promtail-http-input-1.0.0.jar +0 -0
- metadata +11 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b099e0e1658d317ddab2fe890d7f3e8e051671b2039f5d1c878eaf6b17cfeee
|
4
|
+
data.tar.gz: eb8fe2ec97ead1460067c8ea5b47ead34b3805d83f1d2be547522c9d1b45ca02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72799b83a11e68090b11d01fcd0f1e3395c826e449cd57623549ad153abae814f35149ce6f9a6285b48f521cd6782614ae94fa1a079a873b1480be3188bd884a
|
7
|
+
data.tar.gz: a0d25ed050dd5bef9aa87b038f9c3b1630483f822c5c97cd3aff2b1250c4bce9cb64d91a8deb2bdceb21f29cc1ea160b1c48dd28fbce6addae308f101a1e133f
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
1.0.0
|
@@ -7,4 +7,4 @@ require_jar('com.google.protobuf', 'protobuf-java', '3.14.0')
|
|
7
7
|
require_jar('org.xerial.snappy', 'snappy-java', '1.1.8.4')
|
8
8
|
require_jar('com.fasterxml.jackson.core', 'jackson-core', '2.12.3')
|
9
9
|
require_jar('com.fasterxml.jackson.core', 'jackson-databind', '2.12.3')
|
10
|
-
require_jar('org.logstash.plugins.input.http', 'logstash-
|
10
|
+
require_jar('org.logstash.plugins.input.http', 'logstash-promtail-http-input', '1.0.0')
|
data/lib/logstash/inputs/http.rb
CHANGED
@@ -167,12 +167,12 @@ class LogStash::Inputs::Http < LogStash::Inputs::Base
|
|
167
167
|
content_type = headers.fetch("content_type", "")
|
168
168
|
|
169
169
|
if (content_type.start_with?("application/x-protobuf"))
|
170
|
-
# events = @promtail_input.decode_str(@promtail_input.toUTF8String(body))
|
171
170
|
events = @promtail_input.decode(body)
|
172
|
-
events.each do |
|
173
|
-
|
171
|
+
events.each do |e|
|
172
|
+
event = {}.merge(e) # needs copy othervise Time is converted automatically to java.util.Date
|
173
|
+
ts = event["@timestamp"]
|
174
174
|
if ts
|
175
|
-
event
|
175
|
+
event["@timestamp"] = Time.parse(ts)
|
176
176
|
end
|
177
177
|
push_decoded_event(headers, remote_address, LogStash::Event.new(event), false)
|
178
178
|
end
|
@@ -1,8 +1,8 @@
|
|
1
|
-
|
1
|
+
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'logstash-promtail-http-input'
|
5
|
-
s.version = 4.
|
5
|
+
s.version = '4.2'
|
6
6
|
s.licenses = ['Apache License (2.0)']
|
7
7
|
s.summary = "Receives events over HTTP or HTTPS"
|
8
8
|
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"
|
data/spec/inputs/http_spec.rb
CHANGED
@@ -172,6 +172,15 @@ describe LogStash::Inputs::Http do
|
|
172
172
|
expect(event.get("message")).to eq(message)
|
173
173
|
expect(event.get("tenant")).to eq(tenant)
|
174
174
|
end
|
175
|
+
it "should set fake tenant" do
|
176
|
+
promtail_input = org.logstash.plugins.inputs.http.promtail.PromtailHandler.new
|
177
|
+
message = "My compressed and protobuf-ed message"
|
178
|
+
tenant = "fake"
|
179
|
+
promtail_input.sendLogHttp("http://127.0.0.1:#{port}/template/loki", message, tenant)
|
180
|
+
event = logstash_queue.pop
|
181
|
+
expect(event.get("message")).to eq(message)
|
182
|
+
expect(event.get("tenant")).to eq(tenant)
|
183
|
+
end
|
175
184
|
end
|
176
185
|
context "when receiving a deflate compressed text/plain request" do
|
177
186
|
it "should process the request normally" do
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,17 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-promtail-http-input
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '4.
|
4
|
+
version: '4.2'
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: logstash-core-plugin-api
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
16
15
|
requirements:
|
17
16
|
- - ">="
|
@@ -20,6 +19,7 @@ dependencies:
|
|
20
19
|
- - "<="
|
21
20
|
- !ruby/object:Gem::Version
|
22
21
|
version: '2.99'
|
22
|
+
name: logstash-core-plugin-api
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -31,12 +31,12 @@ dependencies:
|
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '2.99'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
|
-
name: logstash-codec-plain
|
35
34
|
requirement: !ruby/object:Gem::Requirement
|
36
35
|
requirements:
|
37
36
|
- - ">="
|
38
37
|
- !ruby/object:Gem::Version
|
39
38
|
version: '0'
|
39
|
+
name: logstash-codec-plain
|
40
40
|
type: :runtime
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -45,7 +45,6 @@ dependencies:
|
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '0'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
|
-
name: jar-dependencies
|
49
48
|
requirement: !ruby/object:Gem::Requirement
|
50
49
|
requirements:
|
51
50
|
- - "~>"
|
@@ -54,6 +53,7 @@ dependencies:
|
|
54
53
|
- - ">="
|
55
54
|
- !ruby/object:Gem::Version
|
56
55
|
version: 0.3.4
|
56
|
+
name: jar-dependencies
|
57
57
|
type: :runtime
|
58
58
|
prerelease: false
|
59
59
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -65,12 +65,12 @@ dependencies:
|
|
65
65
|
- !ruby/object:Gem::Version
|
66
66
|
version: 0.3.4
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
|
-
name: logstash-devutils
|
69
68
|
requirement: !ruby/object:Gem::Requirement
|
70
69
|
requirements:
|
71
70
|
- - ">="
|
72
71
|
- !ruby/object:Gem::Version
|
73
72
|
version: '0'
|
73
|
+
name: logstash-devutils
|
74
74
|
type: :development
|
75
75
|
prerelease: false
|
76
76
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -79,12 +79,12 @@ dependencies:
|
|
79
79
|
- !ruby/object:Gem::Version
|
80
80
|
version: '0'
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
|
-
name: logstash-codec-json
|
83
82
|
requirement: !ruby/object:Gem::Requirement
|
84
83
|
requirements:
|
85
84
|
- - ">="
|
86
85
|
- !ruby/object:Gem::Version
|
87
86
|
version: '0'
|
87
|
+
name: logstash-codec-json
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
90
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -93,12 +93,12 @@ dependencies:
|
|
93
93
|
- !ruby/object:Gem::Version
|
94
94
|
version: '0'
|
95
95
|
- !ruby/object:Gem::Dependency
|
96
|
-
name: logstash-codec-json_lines
|
97
96
|
requirement: !ruby/object:Gem::Requirement
|
98
97
|
requirements:
|
99
98
|
- - ">="
|
100
99
|
- !ruby/object:Gem::Version
|
101
100
|
version: '0'
|
101
|
+
name: logstash-codec-json_lines
|
102
102
|
type: :development
|
103
103
|
prerelease: false
|
104
104
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -107,12 +107,12 @@ dependencies:
|
|
107
107
|
- !ruby/object:Gem::Version
|
108
108
|
version: '0'
|
109
109
|
- !ruby/object:Gem::Dependency
|
110
|
-
name: manticore
|
111
110
|
requirement: !ruby/object:Gem::Requirement
|
112
111
|
requirements:
|
113
112
|
- - ">="
|
114
113
|
- !ruby/object:Gem::Version
|
115
114
|
version: '0'
|
115
|
+
name: manticore
|
116
116
|
type: :development
|
117
117
|
prerelease: false
|
118
118
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -150,6 +150,7 @@ files:
|
|
150
150
|
- vendor/jar-dependencies/io/netty/netty-all/4.1.49.Final/netty-all-4.1.49.Final.jar
|
151
151
|
- vendor/jar-dependencies/org/apache/logging/log4j/log4j-api/2.11.1/log4j-api-2.11.1.jar
|
152
152
|
- vendor/jar-dependencies/org/logstash/plugins/input/http/logstash-input-http/4.0.1/logstash-input-http-4.0.1.jar
|
153
|
+
- vendor/jar-dependencies/org/logstash/plugins/input/http/logstash-promtail-http-input/1.0.0/logstash-promtail-http-input-1.0.0.jar
|
153
154
|
- vendor/jar-dependencies/org/xerial/snappy/snappy-java/1.1.8.4/snappy-java-1.1.8.4.jar
|
154
155
|
homepage: http://www.elastic.co/guide/en/logstash/current/index.html
|
155
156
|
licenses:
|
@@ -173,7 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
173
174
|
- !ruby/object:Gem::Version
|
174
175
|
version: '0'
|
175
176
|
requirements: []
|
176
|
-
rubygems_version: 3.
|
177
|
+
rubygems_version: 3.0.6
|
177
178
|
signing_key:
|
178
179
|
specification_version: 4
|
179
180
|
summary: Receives events over HTTP or HTTPS
|