fluent-plugin-sumologic_output 1.8.0 → 1.9.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/.github/workflows/publish.yaml +23 -0
- data/.github/workflows/pull_request.yaml +15 -0
- data/CHANGELOG.md +13 -0
- data/CONTRIBUTING.md +23 -0
- data/README.md +1 -1
- data/fluent-plugin-sumologic_output.gemspec +6 -8
- data/lib/fluent/plugin/out_sumologic.rb +31 -47
- data/test/plugin/test_out_sumologic.rb +51 -6
- data/vagrant/provision.sh +1 -2
- metadata +23 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbb31ea7d5a93f777e1c509790dec08a6462bade567f4ff222a62c628e3790b4
|
4
|
+
data.tar.gz: ed18ad85714d06efaee5c68689dfc36e4e78794e3a326602f46fd5947c28ee6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20ee2dc1b70ea6845e8251711e997ce08c682c2c5bdbf923cbef8b26a907498174a8ea77dcac8f9e405bead5deaa2acff1cc560c9c2c9dfa41c18f1c549372b1
|
7
|
+
data.tar.gz: 9c6bbd8fb280eba89718191a68f6d79a1f244f34d863aa9aa621e47766ad20769e98a5ee6718a77b2934551562b9c8603b06879de30f51fd3f9d24a3e6252dca
|
@@ -0,0 +1,23 @@
|
|
1
|
+
name: Publish
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
tags:
|
6
|
+
- '[0-9]+.[0-9]+.[0-9]+'
|
7
|
+
- '[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+'
|
8
|
+
- '[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+'
|
9
|
+
- '[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+'
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
publish:
|
13
|
+
runs-on: ubuntu-20.04
|
14
|
+
|
15
|
+
steps:
|
16
|
+
- uses: actions/checkout@v4
|
17
|
+
|
18
|
+
- name: Build
|
19
|
+
run: gem build fluent-plugin-sumologic_output.gemspec
|
20
|
+
- name: Publish
|
21
|
+
env:
|
22
|
+
GEM_HOST_API_KEY: ${{ secrets.RUGYGEMS_APIKEY }}
|
23
|
+
run: gem push fluent-plugin-sumologic_output-*.gem
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,19 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file. Tracking did not begin until version 1.10.
|
4
4
|
|
5
|
+
## [1.9.0]
|
6
|
+
|
7
|
+
Released 2024-02-14
|
8
|
+
|
9
|
+
- feat: enable compression by default [#87](https://github.com/SumoLogic/fluentd-output-sumologic/pull/87)
|
10
|
+
- feat: log warning if `log_key` does not exist in log [#86](https://github.com/SumoLogic/fluentd-output-sumologic/pull/86)
|
11
|
+
- fix: fix how `compress` configuration flag works [#90](https://github.com/SumoLogic/fluentd-output-sumologic/pull/90)
|
12
|
+
|
13
|
+
In `v1.8.0`, setting `compress` flag to either `true` or `false` caused compression to be enabled.
|
14
|
+
This is now fixed.
|
15
|
+
|
16
|
+
[1.9.0]: https://github.com/SumoLogic/fluentd-output-sumologic/releases/1.9.0
|
17
|
+
|
5
18
|
<a name="1.8.0"></a>
|
6
19
|
# [1.8.0] (2022-04-22)
|
7
20
|
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# Contributing
|
2
|
+
|
3
|
+
## How to release
|
4
|
+
|
5
|
+
1. Create a pull request named `chore: release x.y.z` with the following changes:
|
6
|
+
|
7
|
+
- Set `gem.version` to `"x.y.z"` in [fluent-plugin-sumologic_output.gemspec](fluent-plugin-sumologic_output.gemspec).
|
8
|
+
- Add new version to [CHANGELOG.md](./CHANGELOG.md).
|
9
|
+
|
10
|
+
2. Create and push the release tag:
|
11
|
+
|
12
|
+
```bash
|
13
|
+
git checkout main
|
14
|
+
git pull
|
15
|
+
export VERSION=x.y.z
|
16
|
+
git tag -a "v${VERSION}" -m "Release v${VERSION}"
|
17
|
+
git push origin "v${VERSION}"
|
18
|
+
```
|
19
|
+
|
20
|
+
This will trigger the GitHub Actions [publish](./.github/workflows/publish.yaml) action to pubilsh the gem in Ruby Gems.
|
21
|
+
|
22
|
+
3. Go to https://github.com/SumoLogic/fluentd-output-sumologic/releases and create a new release for the tag.
|
23
|
+
Copy the changes from Changelog and publish the release.
|
data/README.md
CHANGED
@@ -34,7 +34,7 @@ Configuration options for fluent.conf are:
|
|
34
34
|
* `proxy_uri` - Add the `uri` of the `proxy` environment if present.
|
35
35
|
* `metric_data_format` - The format of metrics you will be sending, either `graphite` or `carbon2` or `prometheus` (Default is `graphite `)
|
36
36
|
* `disable_cookies` - Option to disable cookies on the HTTP Client. (Default is `false `)
|
37
|
-
* `compress` - Option to enable compression (default `
|
37
|
+
* `compress` - Option to enable compression (default `true`)
|
38
38
|
* `compress_encoding` - Compression encoding format, either `gzip` or `deflate` (default `gzip`)
|
39
39
|
* `custom_fields` - Comma-separated key=value list of fields to apply to every log. [more information](https://help.sumologic.com/Manage/Fields#http-source-fields)
|
40
40
|
* `custom_dimensions` - Comma-separated key=value list of dimensions to apply to every metric. [more information](https://help.sumologic.com/03Send-Data/Sources/02Sources-for-Hosted-Collectors/HTTP-Source/Upload-Metrics-to-an-HTTP-Source#supported-http-headers)
|
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |gem|
|
6
6
|
gem.name = "fluent-plugin-sumologic_output"
|
7
|
-
gem.version = "1.
|
7
|
+
gem.version = "1.9.0"
|
8
8
|
gem.authors = ["Steven Adams", "Frank Reno"]
|
9
9
|
gem.email = ["stevezau@gmail.com", "frank.reno@me.com"]
|
10
10
|
gem.description = %q{Output plugin to SumoLogic HTTP Endpoint}
|
@@ -17,12 +17,10 @@ Gem::Specification.new do |gem|
|
|
17
17
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
18
|
gem.require_paths = ["lib"]
|
19
19
|
|
20
|
-
gem.
|
21
|
-
|
22
|
-
gem.add_development_dependency "bundler", "~> 2"
|
20
|
+
gem.add_development_dependency "bundler"
|
23
21
|
gem.add_development_dependency "rake"
|
24
|
-
gem.add_development_dependency 'test-unit'
|
25
|
-
gem.add_development_dependency "codecov"
|
26
|
-
gem.add_runtime_dependency "fluentd"
|
27
|
-
gem.add_runtime_dependency 'httpclient'
|
22
|
+
gem.add_development_dependency 'test-unit'
|
23
|
+
gem.add_development_dependency "codecov"
|
24
|
+
gem.add_runtime_dependency "fluentd"
|
25
|
+
gem.add_runtime_dependency 'httpclient'
|
28
26
|
end
|
@@ -172,7 +172,7 @@ class Fluent::Plugin::Sumologic < Fluent::Plugin::Output
|
|
172
172
|
desc 'Name of sumo client which is send as X-Sumo-Client header'
|
173
173
|
config_param :sumo_client, :string, :default => 'fluentd-output'
|
174
174
|
desc 'Compress payload'
|
175
|
-
config_param :compress, :bool, :default =>
|
175
|
+
config_param :compress, :bool, :default => true
|
176
176
|
desc 'Encoding method of compresssion (either gzip or deflate)'
|
177
177
|
config_param :compress_encoding, :string, :default => SumologicConnection::COMPRESS_GZIP
|
178
178
|
# https://help.sumologic.com/03Send-Data/Sources/02Sources-for-Hosted-Collectors/HTTP-Source/Upload-Metrics-to-an-HTTP-Source#supported-http-headers
|
@@ -196,69 +196,50 @@ class Fluent::Plugin::Sumologic < Fluent::Plugin::Output
|
|
196
196
|
def configure(conf)
|
197
197
|
|
198
198
|
compat_parameters_convert(conf, :buffer)
|
199
|
+
super
|
199
200
|
|
200
|
-
unless
|
201
|
-
raise Fluent::ConfigError, "Invalid SumoLogic endpoint url: #{
|
201
|
+
unless @endpoint =~ URI::regexp
|
202
|
+
raise Fluent::ConfigError, "Invalid SumoLogic endpoint url: #{@endpoint}"
|
202
203
|
end
|
203
204
|
|
204
|
-
unless
|
205
|
-
|
206
|
-
raise Fluent::ConfigError, "Invalid data_type #{conf['data_type']} must be logs or metrics"
|
207
|
-
end
|
205
|
+
unless @data_type =~ /\A(?:logs|metrics)\z/
|
206
|
+
raise Fluent::ConfigError, "Invalid data_type #{@data_type} must be logs or metrics"
|
208
207
|
end
|
209
208
|
|
210
|
-
if
|
211
|
-
unless
|
212
|
-
|
213
|
-
raise Fluent::ConfigError, "Invalid log_format #{conf['log_format']} must be text, json, json_merge or fields"
|
214
|
-
end
|
209
|
+
if @data_type == LOGS_DATA_TYPE
|
210
|
+
unless @log_format =~ /\A(?:json|text|json_merge|fields)\z/
|
211
|
+
raise Fluent::ConfigError, "Invalid log_format #{@log_format} must be text, json, json_merge or fields"
|
215
212
|
end
|
216
213
|
end
|
217
214
|
|
218
|
-
if
|
219
|
-
unless
|
220
|
-
raise Fluent::ConfigError, "Invalid
|
215
|
+
if @data_type == METRICS_DATA_TYPE
|
216
|
+
unless @metric_data_format =~ /\A(?:graphite|carbon2|prometheus)\z/
|
217
|
+
raise Fluent::ConfigError, "Invalid metric_data_format #{@metric_data_format} must be graphite or carbon2 or prometheus"
|
221
218
|
end
|
222
219
|
end
|
223
220
|
|
224
|
-
|
225
|
-
if
|
226
|
-
|
227
|
-
end
|
228
|
-
unless conf['custom_fields']
|
229
|
-
@log.debug "Custom fields: #{conf['custom_fields']}"
|
221
|
+
@custom_fields = validate_key_value_pairs(@custom_fields)
|
222
|
+
if @custom_fields
|
223
|
+
@log.debug "Custom fields: #{@custom_fields}"
|
230
224
|
end
|
231
225
|
|
232
|
-
|
233
|
-
if
|
234
|
-
|
235
|
-
end
|
236
|
-
unless conf['custom_dimensions']
|
237
|
-
@log.debug "Custom dimensions: #{conf['custom_dimensions']}"
|
238
|
-
end
|
239
|
-
|
240
|
-
# For some reason default is set incorrectly in unit-tests
|
241
|
-
if conf['sumo_client'].nil? || conf['sumo_client'].strip.length == 0
|
242
|
-
conf['sumo_client'] = 'fluentd-output'
|
226
|
+
@custom_dimensions = validate_key_value_pairs(@custom_dimensions)
|
227
|
+
if @custom_dimensions
|
228
|
+
@log.debug "Custom dimensions: #{@custom_dimensions}"
|
243
229
|
end
|
244
230
|
|
245
231
|
@sumo_conn = SumologicConnection.new(
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
log,
|
232
|
+
@endpoint,
|
233
|
+
@verify_ssl,
|
234
|
+
@open_timeout,
|
235
|
+
@send_timeout,
|
236
|
+
@proxy_uri,
|
237
|
+
@disable_cookies,
|
238
|
+
@sumo_client,
|
239
|
+
@compress,
|
240
|
+
@compress_encoding,
|
241
|
+
@log,
|
256
242
|
)
|
257
|
-
|
258
|
-
if !conf['max_request_size'].nil? && conf['max_request_size'].to_i <= 0
|
259
|
-
conf['max_request_size'] = '0'
|
260
|
-
end
|
261
|
-
super
|
262
243
|
end
|
263
244
|
|
264
245
|
# This method is called when starting.
|
@@ -367,6 +348,9 @@ class Fluent::Plugin::Sumologic < Fluent::Plugin::Output
|
|
367
348
|
when 'logs'
|
368
349
|
case log_format
|
369
350
|
when 'text'
|
351
|
+
if !record.has_key?(@log_key)
|
352
|
+
log.warn "log key `#{@log_key}` has not been found in the log"
|
353
|
+
end
|
370
354
|
log = log_to_str(record[@log_key])
|
371
355
|
when 'json_merge'
|
372
356
|
if @add_timestamp
|
@@ -19,7 +19,15 @@ class SumologicOutput < Test::Unit::TestCase
|
|
19
19
|
def test_no_endpoint_configure
|
20
20
|
config = %{}
|
21
21
|
exception = assert_raise(Fluent::ConfigError) {create_driver(config)}
|
22
|
-
assert_equal("
|
22
|
+
assert_equal("'endpoint' parameter is required", exception.message)
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_invalid_endpoint
|
26
|
+
config = %{
|
27
|
+
endpoint Not-a-URL
|
28
|
+
}
|
29
|
+
exception = assert_raise(Fluent::ConfigError) {create_driver(config)}
|
30
|
+
assert_equal("Invalid SumoLogic endpoint url: Not-a-URL", exception.message)
|
23
31
|
end
|
24
32
|
|
25
33
|
def test_invalid_data_type_configure
|
@@ -40,14 +48,14 @@ class SumologicOutput < Test::Unit::TestCase
|
|
40
48
|
assert_equal("Invalid log_format foo must be text, json, json_merge or fields", exception.message)
|
41
49
|
end
|
42
50
|
|
43
|
-
def
|
51
|
+
def test_invalid_metric_data_format
|
44
52
|
config = %{
|
45
53
|
endpoint https://SUMOLOGIC_URL
|
46
54
|
data_type metrics
|
47
|
-
|
55
|
+
metric_data_format foo
|
48
56
|
}
|
49
57
|
exception = assert_raise(Fluent::ConfigError) {create_driver(config)}
|
50
|
-
assert_equal("Invalid
|
58
|
+
assert_equal("Invalid metric_data_format foo must be graphite or carbon2 or prometheus", exception.message)
|
51
59
|
end
|
52
60
|
|
53
61
|
def test_default_configure
|
@@ -73,11 +81,13 @@ class SumologicOutput < Test::Unit::TestCase
|
|
73
81
|
assert_equal instance.proxy_uri, nil
|
74
82
|
assert_equal instance.disable_cookies, false
|
75
83
|
assert_equal instance.sumo_client, 'fluentd-output'
|
84
|
+
assert_equal instance.compress, true
|
76
85
|
assert_equal instance.compress_encoding, 'gzip'
|
77
86
|
end
|
78
87
|
|
79
88
|
def test_emit_text
|
80
89
|
config = %{
|
90
|
+
compress false
|
81
91
|
endpoint https://collectors.sumologic.com/v1/receivers/http/1234
|
82
92
|
log_format text
|
83
93
|
source_category test
|
@@ -99,6 +109,7 @@ class SumologicOutput < Test::Unit::TestCase
|
|
99
109
|
|
100
110
|
def test_emit_text_custom_sumo_client
|
101
111
|
config = %{
|
112
|
+
compress false
|
102
113
|
endpoint https://collectors.sumologic.com/v1/receivers/http/1234
|
103
114
|
log_format text
|
104
115
|
source_category test
|
@@ -121,6 +132,7 @@ class SumologicOutput < Test::Unit::TestCase
|
|
121
132
|
|
122
133
|
def test_emit_json
|
123
134
|
config = %{
|
135
|
+
compress false
|
124
136
|
endpoint https://collectors.sumologic.com/v1/receivers/http/1234
|
125
137
|
log_format json
|
126
138
|
source_category test
|
@@ -142,6 +154,7 @@ class SumologicOutput < Test::Unit::TestCase
|
|
142
154
|
|
143
155
|
def test_emit_empty_fields
|
144
156
|
config = %{
|
157
|
+
compress false
|
145
158
|
endpoint https://collectors.sumologic.com/v1/receivers/http/1234
|
146
159
|
log_format fields
|
147
160
|
source_category test
|
@@ -163,6 +176,7 @@ class SumologicOutput < Test::Unit::TestCase
|
|
163
176
|
|
164
177
|
def test_emit_json_double_encoded
|
165
178
|
config = %{
|
179
|
+
compress false
|
166
180
|
endpoint https://endpoint3.collection.us2.sumologic.com/receiver/v1/http/1234
|
167
181
|
log_format json
|
168
182
|
source_category test
|
@@ -184,6 +198,7 @@ class SumologicOutput < Test::Unit::TestCase
|
|
184
198
|
|
185
199
|
def test_emit_text_format_as_json
|
186
200
|
config = %{
|
201
|
+
compress false
|
187
202
|
endpoint https://endpoint3.collection.us2.sumologic.com/receiver/v1/http/1234
|
188
203
|
log_format json
|
189
204
|
source_category test
|
@@ -205,6 +220,7 @@ class SumologicOutput < Test::Unit::TestCase
|
|
205
220
|
|
206
221
|
def test_emit_json_merge
|
207
222
|
config = %{
|
223
|
+
compress false
|
208
224
|
endpoint https://collectors.sumologic.com/v1/receivers/http/1234
|
209
225
|
log_format json_merge
|
210
226
|
source_category test
|
@@ -226,6 +242,7 @@ class SumologicOutput < Test::Unit::TestCase
|
|
226
242
|
|
227
243
|
def test_emit_json_merge_timestamp
|
228
244
|
config = %{
|
245
|
+
compress false
|
229
246
|
endpoint https://collectors.sumologic.com/v1/receivers/http/1234
|
230
247
|
log_format json_merge
|
231
248
|
source_category test
|
@@ -247,6 +264,7 @@ class SumologicOutput < Test::Unit::TestCase
|
|
247
264
|
|
248
265
|
def test_emit_with_sumo_metadata_with_fields_json_format
|
249
266
|
config = %{
|
267
|
+
compress false
|
250
268
|
endpoint https://collectors.sumologic.com/v1/receivers/http/1234
|
251
269
|
log_format json
|
252
270
|
}
|
@@ -270,6 +288,7 @@ class SumologicOutput < Test::Unit::TestCase
|
|
270
288
|
|
271
289
|
def test_emit_with_sumo_metadata_with_fields_fields_format
|
272
290
|
config = %{
|
291
|
+
compress false
|
273
292
|
endpoint https://collectors.sumologic.com/v1/receivers/http/1234
|
274
293
|
log_format fields
|
275
294
|
}
|
@@ -293,6 +312,7 @@ class SumologicOutput < Test::Unit::TestCase
|
|
293
312
|
|
294
313
|
def test_emit_with_sumo_metadata_with_fields_and_custom_fields_fields_format
|
295
314
|
config = %{
|
315
|
+
compress false
|
296
316
|
endpoint https://collectors.sumologic.com/v1/receivers/http/1234
|
297
317
|
log_format fields
|
298
318
|
custom_fields "lorem=ipsum,dolor=amet"
|
@@ -317,6 +337,7 @@ class SumologicOutput < Test::Unit::TestCase
|
|
317
337
|
|
318
338
|
def test_emit_with_sumo_metadata_with_fields_and_empty_custom_fields_fields_format
|
319
339
|
config = %{
|
340
|
+
compress false
|
320
341
|
endpoint https://collectors.sumologic.com/v1/receivers/http/1234
|
321
342
|
log_format fields
|
322
343
|
custom_fields ""
|
@@ -341,6 +362,7 @@ class SumologicOutput < Test::Unit::TestCase
|
|
341
362
|
|
342
363
|
def test_emit_with_sumo_metadata_with_empty_fields_and_custom_fields_fields_format
|
343
364
|
config = %{
|
365
|
+
compress false
|
344
366
|
endpoint https://collectors.sumologic.com/v1/receivers/http/1234
|
345
367
|
log_format fields
|
346
368
|
custom_fields "lorem=ipsum,invalid"
|
@@ -365,6 +387,7 @@ class SumologicOutput < Test::Unit::TestCase
|
|
365
387
|
|
366
388
|
def test_emit_with_sumo_metadata
|
367
389
|
config = %{
|
390
|
+
compress false
|
368
391
|
endpoint https://collectors.sumologic.com/v1/receivers/http/1234
|
369
392
|
log_format json
|
370
393
|
}
|
@@ -387,6 +410,7 @@ class SumologicOutput < Test::Unit::TestCase
|
|
387
410
|
|
388
411
|
def test_emit_json_no_timestamp
|
389
412
|
config = %{
|
413
|
+
compress false
|
390
414
|
endpoint https://collectors.sumologic.com/v1/receivers/http/1234
|
391
415
|
log_format json
|
392
416
|
source_category test
|
@@ -408,6 +432,7 @@ class SumologicOutput < Test::Unit::TestCase
|
|
408
432
|
|
409
433
|
def test_emit_json_timestamp_key
|
410
434
|
config = %{
|
435
|
+
compress false
|
411
436
|
endpoint https://collectors.sumologic.com/v1/receivers/http/1234
|
412
437
|
log_format json
|
413
438
|
source_category test
|
@@ -429,6 +454,7 @@ class SumologicOutput < Test::Unit::TestCase
|
|
429
454
|
|
430
455
|
def test_emit_graphite
|
431
456
|
config = %{
|
457
|
+
compress false
|
432
458
|
endpoint https://collectors.sumologic.com/v1/receivers/http/1234
|
433
459
|
data_type metrics
|
434
460
|
metric_data_format graphite
|
@@ -450,6 +476,7 @@ class SumologicOutput < Test::Unit::TestCase
|
|
450
476
|
|
451
477
|
def test_emit_carbon
|
452
478
|
config = %{
|
479
|
+
compress false
|
453
480
|
endpoint https://collectors.sumologic.com/v1/receivers/http/1234
|
454
481
|
data_type metrics
|
455
482
|
metric_data_format carbon2
|
@@ -471,6 +498,7 @@ class SumologicOutput < Test::Unit::TestCase
|
|
471
498
|
|
472
499
|
def test_emit_prometheus
|
473
500
|
config = %{
|
501
|
+
compress false
|
474
502
|
endpoint https://collectors.sumologic.com/v1/receivers/http/1234
|
475
503
|
data_type metrics
|
476
504
|
metric_data_format prometheus
|
@@ -492,6 +520,7 @@ class SumologicOutput < Test::Unit::TestCase
|
|
492
520
|
|
493
521
|
def test_emit_prometheus_with_custom_dimensions
|
494
522
|
config = %{
|
523
|
+
compress false
|
495
524
|
endpoint https://collectors.sumologic.com/v1/receivers/http/1234
|
496
525
|
data_type metrics
|
497
526
|
metric_data_format prometheus
|
@@ -520,6 +549,7 @@ class SumologicOutput < Test::Unit::TestCase
|
|
520
549
|
|
521
550
|
def test_emit_prometheus_with_empty_custom_metadata
|
522
551
|
config = %{
|
552
|
+
compress false
|
523
553
|
endpoint https://collectors.sumologic.com/v1/receivers/http/1234
|
524
554
|
data_type metrics
|
525
555
|
metric_data_format prometheus
|
@@ -547,6 +577,7 @@ class SumologicOutput < Test::Unit::TestCase
|
|
547
577
|
|
548
578
|
def test_batching_same_headers
|
549
579
|
config = %{
|
580
|
+
compress false
|
550
581
|
endpoint https://collectors.sumologic.com/v1/receivers/http/1234
|
551
582
|
log_format json
|
552
583
|
source_category test
|
@@ -568,6 +599,7 @@ class SumologicOutput < Test::Unit::TestCase
|
|
568
599
|
|
569
600
|
def test_batching_different_headers
|
570
601
|
config = %{
|
602
|
+
compress false
|
571
603
|
endpoint https://collectors.sumologic.com/v1/receivers/http/1234
|
572
604
|
log_format json
|
573
605
|
source_category test
|
@@ -593,6 +625,7 @@ class SumologicOutput < Test::Unit::TestCase
|
|
593
625
|
|
594
626
|
def test_batching_different_fields
|
595
627
|
config = %{
|
628
|
+
compress false
|
596
629
|
endpoint https://collectors.sumologic.com/v1/receivers/http/1234
|
597
630
|
log_format fields
|
598
631
|
source_category test
|
@@ -635,7 +668,6 @@ class SumologicOutput < Test::Unit::TestCase
|
|
635
668
|
source_name test
|
636
669
|
compress true
|
637
670
|
compress_encoding deflate
|
638
|
-
|
639
671
|
}
|
640
672
|
driver = create_driver(config)
|
641
673
|
time = event_time
|
@@ -657,7 +689,6 @@ class SumologicOutput < Test::Unit::TestCase
|
|
657
689
|
source_host test
|
658
690
|
source_name test
|
659
691
|
compress true
|
660
|
-
|
661
692
|
}
|
662
693
|
driver = create_driver(config)
|
663
694
|
time = event_time
|
@@ -673,6 +704,7 @@ class SumologicOutput < Test::Unit::TestCase
|
|
673
704
|
|
674
705
|
def test_emit_text_from_array
|
675
706
|
config = %{
|
707
|
+
compress false
|
676
708
|
endpoint https://collectors.sumologic.com/v1/receivers/http/1234
|
677
709
|
log_format text
|
678
710
|
source_category test
|
@@ -694,6 +726,7 @@ class SumologicOutput < Test::Unit::TestCase
|
|
694
726
|
|
695
727
|
def test_emit_text_from_dict
|
696
728
|
config = %{
|
729
|
+
compress false
|
697
730
|
endpoint https://collectors.sumologic.com/v1/receivers/http/1234
|
698
731
|
log_format text
|
699
732
|
source_category test
|
@@ -715,6 +748,7 @@ class SumologicOutput < Test::Unit::TestCase
|
|
715
748
|
|
716
749
|
def test_emit_fields_string_based
|
717
750
|
config = %{
|
751
|
+
compress false
|
718
752
|
endpoint https://collectors.sumologic.com/v1/receivers/http/1234
|
719
753
|
log_format fields
|
720
754
|
source_category test
|
@@ -736,6 +770,7 @@ class SumologicOutput < Test::Unit::TestCase
|
|
736
770
|
|
737
771
|
def test_emit_fields_invalid_json_string_based_1
|
738
772
|
config = %{
|
773
|
+
compress false
|
739
774
|
endpoint https://collectors.sumologic.com/v1/receivers/http/1234
|
740
775
|
log_format fields
|
741
776
|
source_category test
|
@@ -757,6 +792,7 @@ class SumologicOutput < Test::Unit::TestCase
|
|
757
792
|
|
758
793
|
def test_emit_fields_invalid_json_string_based_2
|
759
794
|
config = %{
|
795
|
+
compress false
|
760
796
|
endpoint https://collectors.sumologic.com/v1/receivers/http/1234
|
761
797
|
log_format fields
|
762
798
|
source_category test
|
@@ -778,6 +814,7 @@ class SumologicOutput < Test::Unit::TestCase
|
|
778
814
|
|
779
815
|
def test_emit_fields_invalid_json_string_based_3
|
780
816
|
config = %{
|
817
|
+
compress false
|
781
818
|
endpoint https://collectors.sumologic.com/v1/receivers/http/1234
|
782
819
|
log_format fields
|
783
820
|
source_category test
|
@@ -800,6 +837,7 @@ class SumologicOutput < Test::Unit::TestCase
|
|
800
837
|
def test_warning_response_from_receiver
|
801
838
|
endpoint = "https://collectors.sumologic.com/v1/receivers/http/1234"
|
802
839
|
config = %{
|
840
|
+
compress false
|
803
841
|
endpoint #{endpoint}
|
804
842
|
}
|
805
843
|
testdata = [
|
@@ -828,6 +866,7 @@ class SumologicOutput < Test::Unit::TestCase
|
|
828
866
|
def test_resend
|
829
867
|
endpoint = "https://collectors.sumologic.com/v1/receivers/http/1234"
|
830
868
|
config = %{
|
869
|
+
compress false
|
831
870
|
endpoint #{endpoint}
|
832
871
|
retry_min_interval 0s
|
833
872
|
retry_max_times 3
|
@@ -851,6 +890,7 @@ class SumologicOutput < Test::Unit::TestCase
|
|
851
890
|
def test_resend_failed
|
852
891
|
endpoint = "https://collectors.sumologic.com/v1/receivers/http/1234"
|
853
892
|
config = %{
|
893
|
+
compress false
|
854
894
|
endpoint #{endpoint}
|
855
895
|
retry_min_interval 0s
|
856
896
|
retry_max_times 15
|
@@ -873,6 +913,7 @@ class SumologicOutput < Test::Unit::TestCase
|
|
873
913
|
def test_resend_forever
|
874
914
|
endpoint = "https://collectors.sumologic.com/v1/receivers/http/1234"
|
875
915
|
config = %{
|
916
|
+
compress false
|
876
917
|
endpoint #{endpoint}
|
877
918
|
retry_min_interval 0s
|
878
919
|
retry_max_times 0
|
@@ -897,6 +938,7 @@ class SumologicOutput < Test::Unit::TestCase
|
|
897
938
|
def test_skip_retry
|
898
939
|
endpoint = "https://collectors.sumologic.com/v1/receivers/http/1234"
|
899
940
|
config = %{
|
941
|
+
compress false
|
900
942
|
endpoint #{endpoint}
|
901
943
|
}
|
902
944
|
time = event_time
|
@@ -917,10 +959,12 @@ class SumologicOutput < Test::Unit::TestCase
|
|
917
959
|
|
918
960
|
configs = [
|
919
961
|
%{
|
962
|
+
compress false
|
920
963
|
endpoint #{endpoint}
|
921
964
|
max_request_size -5
|
922
965
|
},
|
923
966
|
%{
|
967
|
+
compress false
|
924
968
|
endpoint #{endpoint}
|
925
969
|
max_request_size 0
|
926
970
|
}
|
@@ -949,6 +993,7 @@ class SumologicOutput < Test::Unit::TestCase
|
|
949
993
|
endpoint = "https://collectors.sumologic.com/v1/receivers/http/1234"
|
950
994
|
|
951
995
|
config = %{
|
996
|
+
compress false
|
952
997
|
endpoint #{endpoint}
|
953
998
|
max_request_size 80
|
954
999
|
}
|
data/vagrant/provision.sh
CHANGED
@@ -22,6 +22,5 @@ usermod -aG docker vagrant
|
|
22
22
|
apt-get install -y make
|
23
23
|
|
24
24
|
# install requirements for ruby
|
25
|
-
snap install ruby --channel=
|
26
|
-
su vagrant -c 'gem install bundler:2.1.4'
|
25
|
+
snap install ruby --channel=3.3/stable --classic
|
27
26
|
apt install -y gcc g++ libsnappy-dev libicu-dev zlib1g-dev cmake pkg-config libssl-dev
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-sumologic_output
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Adams
|
@@ -9,22 +9,22 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-02-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - "
|
18
|
+
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: '
|
20
|
+
version: '0'
|
21
21
|
type: :development
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- - "
|
25
|
+
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: '
|
27
|
+
version: '0'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: rake
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -43,58 +43,58 @@ dependencies:
|
|
43
43
|
name: test-unit
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- - "
|
46
|
+
- - ">="
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version:
|
48
|
+
version: '0'
|
49
49
|
type: :development
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- - "
|
53
|
+
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version:
|
55
|
+
version: '0'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: codecov
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
60
|
- - ">="
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: 0
|
62
|
+
version: '0'
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - ">="
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: 0
|
69
|
+
version: '0'
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: fluentd
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
74
|
- - ">="
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: 0
|
76
|
+
version: '0'
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
81
|
- - ">="
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version: 0
|
83
|
+
version: '0'
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: httpclient
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
|
-
- - "
|
88
|
+
- - ">="
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version:
|
90
|
+
version: '0'
|
91
91
|
type: :runtime
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
|
-
- - "
|
95
|
+
- - ">="
|
96
96
|
- !ruby/object:Gem::Version
|
97
|
-
version:
|
97
|
+
version: '0'
|
98
98
|
description: Output plugin to SumoLogic HTTP Endpoint
|
99
99
|
email:
|
100
100
|
- stevezau@gmail.com
|
@@ -104,9 +104,12 @@ extensions: []
|
|
104
104
|
extra_rdoc_files: []
|
105
105
|
files:
|
106
106
|
- ".github/CODEOWNERS"
|
107
|
+
- ".github/workflows/publish.yaml"
|
108
|
+
- ".github/workflows/pull_request.yaml"
|
107
109
|
- ".gitignore"
|
108
110
|
- ".travis.yml"
|
109
111
|
- CHANGELOG.md
|
112
|
+
- CONTRIBUTING.md
|
110
113
|
- Gemfile
|
111
114
|
- LICENSE
|
112
115
|
- README.md
|
@@ -131,14 +134,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
131
134
|
requirements:
|
132
135
|
- - ">="
|
133
136
|
- !ruby/object:Gem::Version
|
134
|
-
version:
|
137
|
+
version: '0'
|
135
138
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
136
139
|
requirements:
|
137
140
|
- - ">="
|
138
141
|
- !ruby/object:Gem::Version
|
139
142
|
version: '0'
|
140
143
|
requirements: []
|
141
|
-
rubygems_version: 3.
|
144
|
+
rubygems_version: 3.1.2
|
142
145
|
signing_key:
|
143
146
|
specification_version: 4
|
144
147
|
summary: Output plugin to SumoLogic HTTP Endpoint
|