logstash-promtail-http-input 4.0.1-java → 4.1-java

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: 1b2651e738afdde77c0866a8ce634a1cc5759f108225a876f46fb7027879e9ed
4
- data.tar.gz: 00ef01a8709f3b943643ffead7e65cd6440a61e3093c99da85bea40e6c9867a1
3
+ metadata.gz: 21ead6373843dd13049d29b2c85866eebfb367f8c929139b0368703cb0a404a3
4
+ data.tar.gz: f756dff325c01e3ed6abce87f913f8a308602e5c330a146de76e8f610b7cc2b5
5
5
  SHA512:
6
- metadata.gz: 125f280e11dd5d7cb19dbbc5735cf19b995b5fab42df1d0107dc7663af7ef1fd0553e8c56c070828e4f8029cf2c6c34d9dc51e264d9cfe625564e128b50c03f5
7
- data.tar.gz: fe7d6f21344da835ee5e2fbaea135c5ff960223e0c4fc98396f8dea89857b28042ba235dd33fccd0546e6c261b6f7c41475974f985a29267ed81afedd4941afe
6
+ metadata.gz: 57b808b790b9fe28414815c40aedc010d6091f38aa096198eacb965e6148366323a462beebae2873f1c070768b05b596270a1b6ad11de59f6d31796a74ad5658
7
+ data.tar.gz: 7cd0ea260f19672d512af5596bec3b03ffa5dc793cdbeb2747355877b5be6f60f1be4319e565c75062e1b51a1e9504d3e6d6510a0259927bbeb23e22735e12b8
data/README.md CHANGED
@@ -30,17 +30,20 @@ Eg. Logstash configuration:
30
30
  ```yaml
31
31
  input {
32
32
  http {
33
- id => "promtail-http-plugin"
33
+ id => "logstash-promtail-http-input"
34
34
  port => "5043"
35
35
  host => "0.0.0.0"
36
36
  }
37
37
  }
38
+ output {
39
+ stdout { codec => rubydebug }
40
+ }
38
41
  ```
39
42
 
40
43
  ## Building and pushing gem
41
- 1. `gem build logstash-input-http.gemspec`
42
- 2. Push desired build version `logstash-promtail-input-http-{VERSION}.gem`
43
- - In case of massage 'Repushing of gem versions is not allowed.' Raise the plugin version in logstash-output-loki.gemspec
44
+ 1. `gem build logstash-promtail-http-input.gemspec`
45
+ 2. Push desired build version `logstash-promtail-http-input-{VERSION}.gem`
46
+ - In case of massage 'Repushing of gem versions is not allowed.' Raise the plugin version in logstash-promtail-http-input.gemspec
44
47
  - Rebuild the plugin
45
48
  - Push proper version
46
49
 
@@ -113,15 +116,17 @@ You can use the same **2.1** method to run your plugin in an installed Logstash
113
116
 
114
117
  - Build your plugin gem
115
118
  ```sh
116
- gem build logstash-filter-awesome.gemspec
119
+ jruby -S gem build logstash-promtail-http-input.gemspec
120
+
117
121
  ```
118
122
  - Install the plugin from the Logstash home
119
123
  ```sh
120
124
  # Logstash 2.3 and higher
121
125
  bin/logstash-plugin install --no-verify
122
126
 
123
- # Prior to Logstash 2.3
124
- bin/plugin install --no-verify
127
+ # or locally
128
+
129
+ bin/logstash-plugin install --no-verify --local /path_to_gem/logstash-filter-java_drain_filter-0.1.1.gem
125
130
 
126
131
  ```
127
132
  - Start Logstash and proceed to test the plugin
@@ -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-input-http', '3.3.7')
10
+ require_jar('org.logstash.plugins.input.http', 'logstash-input-http', '4.0.1')
@@ -170,6 +170,10 @@ class LogStash::Inputs::Http < LogStash::Inputs::Base
170
170
  # events = @promtail_input.decode_str(@promtail_input.toUTF8String(body))
171
171
  events = @promtail_input.decode(body)
172
172
  events.each do |event|
173
+ ts = event.get("@timestamp")
174
+ if ts
175
+ event.put("@timestamp", Time.parse(ts))
176
+ end
173
177
  push_decoded_event(headers, remote_address, LogStash::Event.new(event), false)
174
178
  end
175
179
  else
@@ -2,7 +2,7 @@ HTTP_INPUT_VERSION = File.read(File.expand_path(File.join(File.dirname(__FILE__)
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'logstash-promtail-http-input'
5
- s.version = HTTP_INPUT_VERSION
5
+ s.version = 4.1
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"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-promtail-http-input
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: '4.1'
5
5
  platform: java
6
6
  authors:
7
7
  - Elastic
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-02 00:00:00.000000000 Z
11
+ date: 2021-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logstash-core-plugin-api
@@ -149,7 +149,7 @@ files:
149
149
  - vendor/jar-dependencies/com/google/protobuf/protobuf-java/3.14.0/protobuf-java-3.14.0.jar
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
- - vendor/jar-dependencies/org/logstash/plugins/input/http/logstash-input-http/3.3.7/logstash-input-http-3.3.7.jar
152
+ - vendor/jar-dependencies/org/logstash/plugins/input/http/logstash-input-http/4.0.1/logstash-input-http-4.0.1.jar
153
153
  - vendor/jar-dependencies/org/xerial/snappy/snappy-java/1.1.8.4/snappy-java-1.1.8.4.jar
154
154
  homepage: http://www.elastic.co/guide/en/logstash/current/index.html
155
155
  licenses:
@@ -157,7 +157,7 @@ licenses:
157
157
  metadata:
158
158
  logstash_plugin: 'true'
159
159
  logstash_group: input
160
- post_install_message:
160
+ post_install_message:
161
161
  rdoc_options: []
162
162
  require_paths:
163
163
  - lib
@@ -173,8 +173,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
173
173
  - !ruby/object:Gem::Version
174
174
  version: '0'
175
175
  requirements: []
176
- rubygems_version: 3.0.3
177
- signing_key:
176
+ rubygems_version: 3.2.15
177
+ signing_key:
178
178
  specification_version: 4
179
179
  summary: Receives events over HTTP or HTTPS
180
180
  test_files: