fluent-plugin-splunk-hec 1.2.9 → 1.2.12

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: 3fbf155dc5649294d859dbdc4bc9967681f8d4051f93e7c108bf926961f93afe
4
- data.tar.gz: 1bf76e9bb39b3bbf9dc0ae87f8ca38046cbe4f30a86ae0c6c6fef4be257fbb74
3
+ metadata.gz: d894794bebe383deedf31c9e928543c90c5353ac880e5ec9b70c681f2186113f
4
+ data.tar.gz: f1eb6d50647ac6acb6c6bd3e4671089d042b14c1f8237160e5928804981509e0
5
5
  SHA512:
6
- metadata.gz: 5228076cb01aa5a32c77f7d532ecb7052f57366e2dbd9d5f1e3fcae1cb7d5ca042bec12393f4c760ce05c4205068473852fdf020255b45d20679af2ee623da85
7
- data.tar.gz: 82a15c018c694133cb6e5d4891413ba272087f385586582ae5b00a91b78bc455918116ee078f52f5cc26f7440852c4f2549d1b1730f2c5f3480130896f7d6fe7
6
+ metadata.gz: a935f7f94dc580bf1ccacfc7055eb7a9e9d0d5f7193bb7a326b690e3c8c1d1b510c8c38443304b7c80b663fc8f17ce2ebd5939a963bc333303a78c3f2f563bd2
7
+ data.tar.gz: b1012167010f85a9124c072f0a8fdf10a2d9dd143dd4d0d2dd96495107b9dcb0d8454103581ea881afacd7e41e861b45f821562e327368da68c4fc03eec6c3fa
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fluent-plugin-splunk-hec (1.2.9)
4
+ fluent-plugin-splunk-hec (1.2.12)
5
5
  fluentd (>= 1.4)
6
6
  multi_json (~> 1.13)
7
7
  net-http-persistent (~> 3.1)
@@ -11,31 +11,30 @@ PATH
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- activemodel (6.1.4.1)
15
- activesupport (= 6.1.4.1)
16
- activesupport (6.1.4.1)
14
+ activemodel (7.0.2.3)
15
+ activesupport (= 7.0.2.3)
16
+ activesupport (7.0.2.3)
17
17
  concurrent-ruby (~> 1.0, >= 1.0.2)
18
18
  i18n (>= 1.6, < 2)
19
19
  minitest (>= 5.1)
20
20
  tzinfo (~> 2.0)
21
- zeitwerk (~> 2.3)
22
21
  addressable (2.8.0)
23
22
  public_suffix (>= 2.0.2, < 5.0)
24
23
  aes_key_wrap (1.1.0)
25
24
  attr_required (1.0.1)
26
25
  bindata (2.4.10)
27
- concurrent-ruby (1.1.9)
26
+ concurrent-ruby (1.1.10)
28
27
  connection_pool (2.2.5)
29
28
  cool.io (1.7.1)
30
29
  crack (0.4.5)
31
30
  rexml
32
31
  docile (1.4.0)
33
- fluentd (1.14.2)
32
+ fluentd (1.14.5)
34
33
  bundler
35
34
  cool.io (>= 1.4.5, < 2.0.0)
36
- http_parser.rb (>= 0.5.1, < 0.8.0)
35
+ http_parser.rb (>= 0.5.1, < 0.9.0)
37
36
  msgpack (>= 1.3.1, < 2.0.0)
38
- serverengine (>= 2.2.2, < 3.0.0)
37
+ serverengine (>= 2.2.5, < 3.0.0)
39
38
  sigdump (~> 0.2.2)
40
39
  strptime (>= 0.2.4, < 1.0.0)
41
40
  tzinfo (>= 1.0, < 3.0)
@@ -43,9 +42,9 @@ GEM
43
42
  webrick (>= 1.4.2, < 1.8.0)
44
43
  yajl-ruby (~> 1.0)
45
44
  hashdiff (1.0.1)
46
- http_parser.rb (0.7.0)
45
+ http_parser.rb (0.8.0)
47
46
  httpclient (2.8.3)
48
- i18n (1.8.11)
47
+ i18n (1.10.0)
49
48
  concurrent-ruby (~> 1.0)
50
49
  json-jwt (1.13.0)
51
50
  activesupport (>= 4.2)
@@ -54,8 +53,8 @@ GEM
54
53
  mail (2.7.1)
55
54
  mini_mime (>= 0.1.1)
56
55
  mini_mime (1.1.2)
57
- minitest (5.14.4)
58
- msgpack (1.4.2)
56
+ minitest (5.15.0)
57
+ msgpack (1.4.5)
59
58
  multi_json (1.15.0)
60
59
  net-http-persistent (3.1.0)
61
60
  connection_pool (~> 2.2)
@@ -70,7 +69,7 @@ GEM
70
69
  validate_url
71
70
  webfinger (>= 1.0.1)
72
71
  power_assert (2.0.1)
73
- prometheus-client (2.1.0)
72
+ prometheus-client (4.0.0)
74
73
  public_suffix (4.0.6)
75
74
  rack (2.2.3)
76
75
  rack-oauth2 (1.19.0)
@@ -81,7 +80,7 @@ GEM
81
80
  rack (>= 2.1.0)
82
81
  rake (13.0.6)
83
82
  rexml (3.2.5)
84
- serverengine (2.2.4)
83
+ serverengine (2.2.5)
85
84
  sigdump (~> 0.2.2)
86
85
  sigdump (0.2.4)
87
86
  simplecov (0.21.2)
@@ -95,11 +94,11 @@ GEM
95
94
  activesupport (>= 3)
96
95
  attr_required (>= 0.0.5)
97
96
  httpclient (>= 2.4)
98
- test-unit (3.5.0)
97
+ test-unit (3.5.3)
99
98
  power_assert
100
99
  tzinfo (2.0.4)
101
100
  concurrent-ruby (~> 1.0)
102
- tzinfo-data (1.2021.5)
101
+ tzinfo-data (1.2022.1)
103
102
  tzinfo (>= 1.0.0)
104
103
  validate_email (0.1.6)
105
104
  activemodel (>= 3.0)
@@ -116,7 +115,6 @@ GEM
116
115
  hashdiff
117
116
  webrick (1.7.0)
118
117
  yajl-ruby (1.4.1)
119
- zeitwerk (2.5.1)
120
118
 
121
119
  PLATFORMS
122
120
  ruby
@@ -131,4 +129,4 @@ DEPENDENCIES
131
129
  webmock (~> 3.5.0)
132
130
 
133
131
  BUNDLED WITH
134
- 2.2.33
132
+ 2.3.10
data/README.md CHANGED
@@ -401,6 +401,7 @@ The following parameters can be used for tuning HTTP connections:
401
401
  The default is five seconds. If a connection has not been used for five seconds, it is automatically reset at next use, in order to avoid attempting to send to a closed connection. Specifiy `nil` to prohibit any timeouts.
402
402
 
403
403
  #### read_timeout (integer)
404
+
404
405
  The amount of time allowed between reading two chunks from the socket. The default value is `nil`, which means no timeout.
405
406
 
406
407
  #### open_timeout (integer)
@@ -421,11 +422,11 @@ The private key for this client.
421
422
 
422
423
  #### ca_file (string)
423
424
 
424
- The path to a file containing a PEM-format CA certificate.
425
+ The path to a file containing CA cerificates in PEM format. The plugin will verify the TLS server certificate presented by Splunk against the certificates in this file, unless verification is disabled by the `ssl_insecure` option.
425
426
 
426
427
  #### ca_path (string)
427
428
 
428
- The path to a directory containing CA certificates in PEM format.
429
+ The path to a directory containing CA certificates in PEM format. The plugin will verify the TLS server certificate presented by Splunk against the certificates in this file, unless verification is disabled by the `ssl_insecure` option.
429
430
 
430
431
  #### ciphers (array)
431
432
 
@@ -433,15 +434,15 @@ List of SSl ciphers allowed.
433
434
 
434
435
  #### insecure_ssl (bool)
435
436
 
436
- Specifies whether an insecure SSL connection is allowed. If set to false, Splunk does not verify an insecure server certificate. This parameter is set to `false` by default. Ensure parameter `ca_file` is not configured in order to allow insecure SSL connections when this value is set to `true`.
437
+ Specifies whether an insecure SSL connection is allowed. If set to `false` (the default), the plugin will verify the TLS server certificate presented by Splunk against the CA certificates provided by the `ca_file`/`ca_path` options, and reject the certificate if if verification fails.
437
438
 
438
439
  #### require_ssl_min_version (bool)
439
440
 
440
- When set to true, TLS version 1.1 and above is required.
441
+ When set to `true` (the default), the plugin will require TLSv1.1 or later for its connection to Splunk.
441
442
 
442
443
  #### consume_chunk_on_4xx_errors (bool)
443
444
 
444
- Specifies whether any 4xx HTTP response status code consumes the buffer chunks. If set to false, Splunk will fail to flush the buffer on such status codes. This parameter is set to `true` by default for backwards compatibility.
445
+ Specifies whether any 4xx HTTP response status code consumes the buffer chunks. If set to `false`, Splunk will fail to flush the buffer on such status codes. This parameter is set to `true` by default for backwards compatibility.
445
446
 
446
447
  ## About Buffer
447
448
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.9
1
+ 1.2.12
@@ -1,13 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'fluent/output'
4
3
  require 'fluent/plugin/output'
5
4
  require 'fluent/plugin/formatter'
6
5
  require 'prometheus/client'
7
6
  require 'benchmark'
8
7
 
9
8
  module Fluent::Plugin
10
- class SplunkOutput < Fluent::BufferedOutput
9
+ class SplunkOutput < Fluent::Plugin::Output
11
10
  helpers :formatter
12
11
 
13
12
  autoload :VERSION, 'fluent/plugin/out_splunk/version'
@@ -100,9 +99,9 @@ module Fluent::Plugin
100
99
  write_to_splunk(chunk)
101
100
  end
102
101
 
103
- @metrics[:record_counter].increment(labels: metric_labels, by: chunk.size_of_events)
102
+ @metrics[:record_counter].increment(labels: metric_labels, by: chunk.size)
104
103
  @metrics[:bytes_counter].increment(labels: metric_labels, by: chunk.bytesize)
105
- @metrics[:write_records_histogram].observe(chunk.size_of_events, labels: metric_labels)
104
+ @metrics[:write_records_histogram].observe(chunk.size, labels: metric_labels)
106
105
  @metrics[:write_bytes_histogram].observe(chunk.bytesize, labels: metric_labels, )
107
106
  @metrics[:write_latency_histogram].observe(t, labels: metric_labels, )
108
107
  end
@@ -140,6 +140,10 @@ module Fluent::Plugin
140
140
  pick_custom_format_method
141
141
  end
142
142
 
143
+ def write(chunk)
144
+ super
145
+ end
146
+
143
147
  def start
144
148
  super
145
149
  @conn = Net::HTTP::Persistent.new.tap do |c|
@@ -41,6 +41,10 @@ module Fluent::Plugin
41
41
  super
42
42
  end
43
43
 
44
+ def write(chunk)
45
+ super
46
+ end
47
+
44
48
  def construct_api
45
49
  uri = "https://#{@ingest_api_host}/#{@ingest_api_tenant}#{@ingest_api_events_endpoint}"
46
50
  URI(uri)
@@ -101,7 +105,7 @@ module Fluent::Plugin
101
105
  end
102
106
 
103
107
  def write_to_splunk(chunk)
104
- log.trace "#{self.class}: In write() with #{chunk.size_of_events} records and #{chunk.bytesize} bytes "
108
+ log.trace "#{self.class}: In write() with #{chunk.size} records and #{chunk.bytesize} bytes "
105
109
  # ingest API is an array of json objects
106
110
  body = "[#{chunk.read.chomp(',')}]"
107
111
  @conn ||= new_connection
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-splunk-hec
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.9
4
+ version: 1.2.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Splunk Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-15 00:00:00.000000000 Z
11
+ date: 2022-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
@@ -221,13 +221,13 @@ signing_key:
221
221
  specification_version: 4
222
222
  summary: Fluentd plugin for Splunk HEC.
223
223
  test_files:
224
+ - test/fluent/plugin/out_splunk_ingest_api_test.rb
225
+ - test/fluent/plugin/out_splunk_hec_test.rb
224
226
  - test/test_helper.rb
225
- - test/lib/webmock/http_lib_adapters/manticore_adapter.rb
226
- - test/lib/webmock/http_lib_adapters/http_rb_adapter.rb
227
- - test/lib/webmock/http_lib_adapters/typhoeus_hydra_adapter.rb
228
- - test/lib/webmock/http_lib_adapters/em_http_request_adapter.rb
229
227
  - test/lib/webmock/http_lib_adapters/excon_adapter.rb
228
+ - test/lib/webmock/http_lib_adapters/em_http_request_adapter.rb
229
+ - test/lib/webmock/http_lib_adapters/typhoeus_hydra_adapter.rb
230
+ - test/lib/webmock/http_lib_adapters/manticore_adapter.rb
230
231
  - test/lib/webmock/http_lib_adapters/curb_adapter.rb
231
232
  - test/lib/webmock/http_lib_adapters/patron_adapter.rb
232
- - test/fluent/plugin/out_splunk_ingest_api_test.rb
233
- - test/fluent/plugin/out_splunk_hec_test.rb
233
+ - test/lib/webmock/http_lib_adapters/http_rb_adapter.rb