logstash-output-sumologic 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/DEVELOPER.md +11 -1
- data/lib/logstash/outputs/sumologic/common.rb +11 -1
- data/lib/logstash/outputs/sumologic/header_builder.rb +4 -4
- data/lib/logstash/outputs/sumologic/piler.rb +2 -2
- data/logstash-output-sumologic.gemspec +2 -2
- metadata +26 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 596877e694163207291385444d3e10ced75cba12422d57b21503126395002f03
|
4
|
+
data.tar.gz: 157f6fc6262ef8990d44d597066bbbcde226e27dc3d48d332a29970d38bd962c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2da6958efa3878652965d1620206a3af61172e1f5ff3f369ed738a0346c0c14949cad1c5e36c4d889e8e3dd75373cf8a6f6f0d6be0c8800dfda14b6be855f74b
|
7
|
+
data.tar.gz: b6021badd961cbe617108676906a55e16beeaa169e9f1a3e8a0b1244508c8271e661f7df8c951b38b7132d61588631a00f9595573abf50de43d69ce4dbcb6693
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 1.3.1 (2020-12-18)
|
4
|
+
|
5
|
+
- [#53](https://github.com/SumoLogic/logstash-output-sumologic/pull/53) Fix "undefined method `blank?'"
|
6
|
+
- [#52](https://github.com/SumoLogic/logstash-output-sumologic/pull/52) Fix logstash-plugin-http_client version conflict in Logstash 7
|
7
|
+
|
3
8
|
## 1.3.0
|
9
|
+
|
4
10
|
- [#41](https://github.com/SumoLogic/logstash-output-sumologic/pull/41) Provide Docker image with Logstash 6.6 + output plugin on docker hub
|
5
11
|
- [#41](https://github.com/SumoLogic/logstash-output-sumologic/pull/41) Kubernetes support with Logstash beats to SumoLogic
|
6
12
|
- [#41](https://github.com/SumoLogic/logstash-output-sumologic/pull/41) CI improving
|
data/DEVELOPER.md
CHANGED
@@ -26,6 +26,15 @@ bin/logstash-plugin install <full path of .gem>
|
|
26
26
|
|
27
27
|
## How to run test with rspec
|
28
28
|
|
29
|
+
### Running in Docker
|
30
|
+
|
31
|
+
```bash
|
32
|
+
docker build -t logstash-output-plugin .
|
33
|
+
docker run --rm -it -e 'sumo_url=https://events.sumologic.net/receiver/v1/http/XXXXXXXXXX' logstash-output-plugin
|
34
|
+
```
|
35
|
+
|
36
|
+
### Running on bare metal
|
37
|
+
|
29
38
|
The test requires JRuby to run. So you need to install [JRuby](http://jruby.org/), [bundle](https://bundler.io/bundle_install.html) and [RVM](https://rvm.io/) (for switching between JRuby and Ruby) first.
|
30
39
|
And then run:
|
31
40
|
|
@@ -36,4 +45,5 @@ export sumo_url=https://events.sumologic.net/receiver/v1/http/XXXXXXXXXX
|
|
36
45
|
rspec spec/
|
37
46
|
```
|
38
47
|
|
39
|
-
The project is integrated to
|
48
|
+
The project is integrated to Travis CI now.
|
49
|
+
Make sure [all test passed](https://travis-ci.com/SumoLogic/logstash-output-sumologic) before creating PR
|
@@ -69,5 +69,15 @@ module LogStash; module Outputs; class SumoLogic;
|
|
69
69
|
end
|
70
70
|
end # def log_dbg
|
71
71
|
|
72
|
+
def blank?(value)
|
73
|
+
if value.kind_of?(NilClass)
|
74
|
+
true
|
75
|
+
elsif value.kind_of?(String)
|
76
|
+
value !~ /\S/
|
77
|
+
else
|
78
|
+
value.respond_to?(:empty?) ? value.empty? : !value
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
72
82
|
end
|
73
|
-
end; end; end
|
83
|
+
end; end; end
|
@@ -25,9 +25,9 @@ module LogStash; module Outputs; class SumoLogic;
|
|
25
25
|
headers = Hash.new
|
26
26
|
headers.merge!(@extra_headers)
|
27
27
|
headers[CLIENT_HEADER] = CLIENT_HEADER_VALUE
|
28
|
-
headers[CATEGORY_HEADER] = event.sprintf(@source_category) unless @source_category
|
29
|
-
headers[HOST_HEADER] = event.sprintf(@source_host) unless @source_host
|
30
|
-
headers[NAME_HEADER] = event.sprintf(@source_name) unless @source_name
|
28
|
+
headers[CATEGORY_HEADER] = event.sprintf(@source_category) unless blank?(@source_category)
|
29
|
+
headers[HOST_HEADER] = event.sprintf(@source_host) unless blank?(@source_host)
|
30
|
+
headers[NAME_HEADER] = event.sprintf(@source_name) unless blank?(@source_name)
|
31
31
|
append_content_header(headers)
|
32
32
|
append_compress_header(headers)
|
33
33
|
headers
|
@@ -49,4 +49,4 @@ module LogStash; module Outputs; class SumoLogic;
|
|
49
49
|
end # append_compress_header
|
50
50
|
|
51
51
|
end
|
52
|
-
end; end; end
|
52
|
+
end; end; end
|
@@ -67,7 +67,7 @@ module LogStash; module Outputs; class SumoLogic;
|
|
67
67
|
@queue.enq(Batch.new(headers, content))
|
68
68
|
@pile[headers] = ""
|
69
69
|
end
|
70
|
-
@pile[headers] = @pile[headers]
|
70
|
+
@pile[headers] = blank?(@pile[headers]) ? payload : "#{@pile[headers]}\n#{payload}"
|
71
71
|
}
|
72
72
|
else
|
73
73
|
@queue.enq(Batch.new(headers, payload))
|
@@ -86,4 +86,4 @@ module LogStash; module Outputs; class SumoLogic;
|
|
86
86
|
end # def enq_and_clear
|
87
87
|
|
88
88
|
end
|
89
|
-
end; end; end
|
89
|
+
end; end; end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-output-sumologic'
|
3
|
-
s.version = '1.3.
|
3
|
+
s.version = '1.3.1'
|
4
4
|
s.licenses = ['Apache-2.0']
|
5
5
|
s.summary = 'Deliever the log to Sumo Logic cloud service.'
|
6
6
|
s.description = 'This gem is a Logstash output plugin to deliver the log or metrics to Sumo Logic cloud service. Go to https://github.com/SumoLogic/logstash-output-sumologic for getting help, reporting issues, etc.'
|
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
|
|
20
20
|
# Gem dependencies
|
21
21
|
s.add_runtime_dependency 'manticore', '>= 0.5.4', '< 1.0.0'
|
22
22
|
s.add_runtime_dependency 'logstash-core-plugin-api', '>= 1.60', '<= 2.99'
|
23
|
-
s.add_runtime_dependency 'logstash-mixin-http_client', '
|
23
|
+
s.add_runtime_dependency 'logstash-mixin-http_client', '>= 6', '< 8'
|
24
24
|
|
25
25
|
s.add_development_dependency 'logstash-codec-plain'
|
26
26
|
s.add_development_dependency 'logstash-devutils'
|
metadata
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-sumologic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sumo Logic
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
+
name: manticore
|
14
15
|
requirement: !ruby/object:Gem::Requirement
|
15
16
|
requirements:
|
16
17
|
- - ">="
|
@@ -19,9 +20,8 @@ dependencies:
|
|
19
20
|
- - "<"
|
20
21
|
- !ruby/object:Gem::Version
|
21
22
|
version: 1.0.0
|
22
|
-
name: manticore
|
23
|
-
prerelease: false
|
24
23
|
type: :runtime
|
24
|
+
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
@@ -31,6 +31,7 @@ dependencies:
|
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 1.0.0
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
|
+
name: logstash-core-plugin-api
|
34
35
|
requirement: !ruby/object:Gem::Requirement
|
35
36
|
requirements:
|
36
37
|
- - ">="
|
@@ -39,9 +40,8 @@ dependencies:
|
|
39
40
|
- - "<="
|
40
41
|
- !ruby/object:Gem::Version
|
41
42
|
version: '2.99'
|
42
|
-
name: logstash-core-plugin-api
|
43
|
-
prerelease: false
|
44
43
|
type: :runtime
|
44
|
+
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - ">="
|
@@ -51,42 +51,48 @@ dependencies:
|
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: '2.99'
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
|
+
name: logstash-mixin-http_client
|
54
55
|
requirement: !ruby/object:Gem::Requirement
|
55
56
|
requirements:
|
56
|
-
- - "
|
57
|
+
- - ">="
|
57
58
|
- !ruby/object:Gem::Version
|
58
|
-
version: '6
|
59
|
-
|
60
|
-
|
59
|
+
version: '6'
|
60
|
+
- - "<"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '8'
|
61
63
|
type: :runtime
|
64
|
+
prerelease: false
|
62
65
|
version_requirements: !ruby/object:Gem::Requirement
|
63
66
|
requirements:
|
64
|
-
- - "
|
67
|
+
- - ">="
|
65
68
|
- !ruby/object:Gem::Version
|
66
|
-
version: '6
|
69
|
+
version: '6'
|
70
|
+
- - "<"
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '8'
|
67
73
|
- !ruby/object:Gem::Dependency
|
74
|
+
name: logstash-codec-plain
|
68
75
|
requirement: !ruby/object:Gem::Requirement
|
69
76
|
requirements:
|
70
77
|
- - ">="
|
71
78
|
- !ruby/object:Gem::Version
|
72
79
|
version: '0'
|
73
|
-
name: logstash-codec-plain
|
74
|
-
prerelease: false
|
75
80
|
type: :development
|
81
|
+
prerelease: false
|
76
82
|
version_requirements: !ruby/object:Gem::Requirement
|
77
83
|
requirements:
|
78
84
|
- - ">="
|
79
85
|
- !ruby/object:Gem::Version
|
80
86
|
version: '0'
|
81
87
|
- !ruby/object:Gem::Dependency
|
88
|
+
name: logstash-devutils
|
82
89
|
requirement: !ruby/object:Gem::Requirement
|
83
90
|
requirements:
|
84
91
|
- - ">="
|
85
92
|
- !ruby/object:Gem::Version
|
86
93
|
version: '0'
|
87
|
-
name: logstash-devutils
|
88
|
-
prerelease: false
|
89
94
|
type: :development
|
95
|
+
prerelease: false
|
90
96
|
version_requirements: !ruby/object:Gem::Requirement
|
91
97
|
requirements:
|
92
98
|
- - ">="
|
@@ -131,7 +137,7 @@ licenses:
|
|
131
137
|
metadata:
|
132
138
|
logstash_plugin: 'true'
|
133
139
|
logstash_group: output
|
134
|
-
post_install_message:
|
140
|
+
post_install_message:
|
135
141
|
rdoc_options: []
|
136
142
|
require_paths:
|
137
143
|
- lib
|
@@ -146,9 +152,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
146
152
|
- !ruby/object:Gem::Version
|
147
153
|
version: '0'
|
148
154
|
requirements: []
|
149
|
-
|
150
|
-
|
151
|
-
signing_key:
|
155
|
+
rubygems_version: 3.1.2
|
156
|
+
signing_key:
|
152
157
|
specification_version: 4
|
153
158
|
summary: Deliever the log to Sumo Logic cloud service.
|
154
159
|
test_files:
|