fluent-plugin-splunk-hec 1.2.9 → 1.2.10

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3fbf155dc5649294d859dbdc4bc9967681f8d4051f93e7c108bf926961f93afe
4
- data.tar.gz: 1bf76e9bb39b3bbf9dc0ae87f8ca38046cbe4f30a86ae0c6c6fef4be257fbb74
3
+ metadata.gz: dc792fc7c40630f15ecb739d4b5fb02d8b0eb82bae0cea4d83f2a3bc2033f86a
4
+ data.tar.gz: 7db6c9fbcc52941f5196c69dfb472b01126983003efa1924b87514ab73ceaab3
5
5
  SHA512:
6
- metadata.gz: 5228076cb01aa5a32c77f7d532ecb7052f57366e2dbd9d5f1e3fcae1cb7d5ca042bec12393f4c760ce05c4205068473852fdf020255b45d20679af2ee623da85
7
- data.tar.gz: 82a15c018c694133cb6e5d4891413ba272087f385586582ae5b00a91b78bc455918116ee078f52f5cc26f7440852c4f2549d1b1730f2c5f3480130896f7d6fe7
6
+ metadata.gz: 0f1370fc994cd6ff1d41e1c8b6714a81159f899fc60f133e7842963f7a2d24b192d7c385b8f4dc596c4b6975e48de40dc3025fda16c9aa7913871fbb30ba3b0d
7
+ data.tar.gz: be09848d438d90c78c45981efd44e1c57d92842ea3249c9099abecb2efdff84bc012766e45cd8807f4a047b73ee42639d277262f277a9ec3c4b4a75eeef9c4e7
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.10)
5
5
  fluentd (>= 1.4)
6
6
  multi_json (~> 1.13)
7
7
  net-http-persistent (~> 3.1)
@@ -11,14 +11,13 @@ 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.1)
15
+ activesupport (= 7.0.1)
16
+ activesupport (7.0.1)
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)
@@ -30,10 +29,10 @@ GEM
30
29
  crack (0.4.5)
31
30
  rexml
32
31
  docile (1.4.0)
33
- fluentd (1.14.2)
32
+ fluentd (1.14.4)
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
37
  serverengine (>= 2.2.2, < 3.0.0)
39
38
  sigdump (~> 0.2.2)
@@ -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.9.1)
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.4)
59
58
  multi_json (1.15.0)
60
59
  net-http-persistent (3.1.0)
61
60
  connection_pool (~> 2.2)
@@ -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,7 +94,7 @@ 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)
@@ -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.6
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.9
1
+ 1.2.10
@@ -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.10
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-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
@@ -222,12 +222,12 @@ specification_version: 4
222
222
  summary: Fluentd plugin for Splunk HEC.
223
223
  test_files:
224
224
  - test/test_helper.rb
225
+ - test/fluent/plugin/out_splunk_ingest_api_test.rb
226
+ - test/fluent/plugin/out_splunk_hec_test.rb
225
227
  - test/lib/webmock/http_lib_adapters/manticore_adapter.rb
228
+ - test/lib/webmock/http_lib_adapters/curb_adapter.rb
229
+ - test/lib/webmock/http_lib_adapters/patron_adapter.rb
226
230
  - test/lib/webmock/http_lib_adapters/http_rb_adapter.rb
227
231
  - test/lib/webmock/http_lib_adapters/typhoeus_hydra_adapter.rb
228
- - test/lib/webmock/http_lib_adapters/em_http_request_adapter.rb
229
232
  - test/lib/webmock/http_lib_adapters/excon_adapter.rb
230
- - test/lib/webmock/http_lib_adapters/curb_adapter.rb
231
- - 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/em_http_request_adapter.rb