fluent-plugin-splunk-hec 1.2.6 → 1.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +17 -19
- data/VERSION +1 -1
- data/fluent-plugin-splunk-hec.gemspec +1 -1
- data/lib/fluent/plugin/out_splunk.rb +28 -18
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82583190560421481d9200800ba359a624e90e9abcfb8c34ff192e3a030802b7
|
4
|
+
data.tar.gz: 83b5d8718c249a48771f6baee0e0ff7519aacd1122c80598e67bd615a02f0727
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 149aef4f611a186754d61eb04a1329615f811ad2f9a6c4b07c0a2153f2d0b30564fd7166beadcd233ff87900d2cf75d6d51e347725f1bbf657a01a9d07b6f42d
|
7
|
+
data.tar.gz: 5f2f8109fb5c3ed10c88f9d3b95f94d10c52c3df4c812f480780e7f7234c3339c69c0451a931c0da94ba42ab58a5894f7f8cfb9a1534fcac51322d21fedda3bc
|
data/Gemfile.lock
CHANGED
@@ -1,25 +1,25 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
fluent-plugin-splunk-hec (1.2.
|
4
|
+
fluent-plugin-splunk-hec (1.2.7)
|
5
5
|
fluentd (>= 1.4)
|
6
6
|
multi_json (~> 1.13)
|
7
7
|
net-http-persistent (~> 3.1)
|
8
8
|
openid_connect (~> 1.1.8)
|
9
|
-
prometheus-client (
|
9
|
+
prometheus-client (>= 2.1.0)
|
10
10
|
|
11
11
|
GEM
|
12
12
|
remote: https://rubygems.org/
|
13
13
|
specs:
|
14
|
-
activemodel (6.1.
|
15
|
-
activesupport (= 6.1.
|
16
|
-
activesupport (6.1.
|
14
|
+
activemodel (6.1.4)
|
15
|
+
activesupport (= 6.1.4)
|
16
|
+
activesupport (6.1.4)
|
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
21
|
zeitwerk (~> 2.3)
|
22
|
-
addressable (2.
|
22
|
+
addressable (2.8.0)
|
23
23
|
public_suffix (>= 2.0.2, < 5.0)
|
24
24
|
aes_key_wrap (1.1.0)
|
25
25
|
ast (2.4.2)
|
@@ -30,11 +30,11 @@ GEM
|
|
30
30
|
cool.io (1.7.1)
|
31
31
|
crack (0.4.5)
|
32
32
|
rexml
|
33
|
-
docile (1.
|
34
|
-
fluentd (1.13.
|
33
|
+
docile (1.4.0)
|
34
|
+
fluentd (1.13.2)
|
35
35
|
bundler
|
36
36
|
cool.io (>= 1.4.5, < 2.0.0)
|
37
|
-
http_parser.rb (>= 0.5.1, < 0.
|
37
|
+
http_parser.rb (>= 0.5.1, < 0.8.0)
|
38
38
|
msgpack (>= 1.3.1, < 2.0.0)
|
39
39
|
serverengine (>= 2.2.2, < 3.0.0)
|
40
40
|
sigdump (~> 0.2.2)
|
@@ -44,7 +44,7 @@ GEM
|
|
44
44
|
webrick (>= 1.4.2, < 1.8.0)
|
45
45
|
yajl-ruby (~> 1.0)
|
46
46
|
hashdiff (1.0.1)
|
47
|
-
http_parser.rb (0.
|
47
|
+
http_parser.rb (0.7.0)
|
48
48
|
httpclient (2.8.3)
|
49
49
|
i18n (1.8.10)
|
50
50
|
concurrent-ruby (~> 1.0)
|
@@ -72,14 +72,12 @@ GEM
|
|
72
72
|
validate_url
|
73
73
|
webfinger (>= 1.0.1)
|
74
74
|
parallel (1.20.1)
|
75
|
-
parser (3.0.
|
75
|
+
parser (3.0.2.0)
|
76
76
|
ast (~> 2.4.1)
|
77
77
|
power_assert (2.0.0)
|
78
78
|
powerpack (0.1.3)
|
79
|
-
prometheus-client (
|
80
|
-
quantile (~> 0.2.1)
|
79
|
+
prometheus-client (2.1.0)
|
81
80
|
public_suffix (4.0.6)
|
82
|
-
quantile (0.2.1)
|
83
81
|
rack (2.2.3)
|
84
82
|
rack-oauth2 (1.17.0)
|
85
83
|
activesupport
|
@@ -88,8 +86,8 @@ GEM
|
|
88
86
|
json-jwt (>= 1.11.0)
|
89
87
|
rack (>= 2.1.0)
|
90
88
|
rainbow (3.0.0)
|
91
|
-
rake (13.0.
|
92
|
-
rexml (3.2.
|
89
|
+
rake (13.0.6)
|
90
|
+
rexml (3.2.5)
|
93
91
|
rubocop (0.63.1)
|
94
92
|
jaro_winkler (~> 1.5.1)
|
95
93
|
parallel (~> 1.10)
|
@@ -107,13 +105,13 @@ GEM
|
|
107
105
|
simplecov-html (~> 0.11)
|
108
106
|
simplecov_json_formatter (~> 0.1)
|
109
107
|
simplecov-html (0.12.3)
|
110
|
-
simplecov_json_formatter (0.1.
|
108
|
+
simplecov_json_formatter (0.1.3)
|
111
109
|
strptime (0.2.5)
|
112
110
|
swd (1.2.0)
|
113
111
|
activesupport (>= 3)
|
114
112
|
attr_required (>= 0.0.5)
|
115
113
|
httpclient (>= 2.4)
|
116
|
-
test-unit (3.4.
|
114
|
+
test-unit (3.4.4)
|
117
115
|
power_assert
|
118
116
|
tzinfo (2.0.4)
|
119
117
|
concurrent-ruby (~> 1.0)
|
@@ -151,4 +149,4 @@ DEPENDENCIES
|
|
151
149
|
webmock (~> 3.5.0)
|
152
150
|
|
153
151
|
BUNDLED WITH
|
154
|
-
2.2.
|
152
|
+
2.2.23
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.2.
|
1
|
+
1.2.7
|
@@ -37,7 +37,7 @@ Gem::Specification.new do |spec|
|
|
37
37
|
spec.add_runtime_dependency 'multi_json', '~> 1.13'
|
38
38
|
spec.add_runtime_dependency 'net-http-persistent', '~> 3.1'
|
39
39
|
spec.add_runtime_dependency 'openid_connect', '~> 1.1.8'
|
40
|
-
spec.add_runtime_dependency 'prometheus-client', '
|
40
|
+
spec.add_runtime_dependency 'prometheus-client', '>= 2.1.0'
|
41
41
|
|
42
42
|
spec.add_development_dependency 'bundler', '~> 2.0'
|
43
43
|
spec.add_development_dependency 'rake', '>= 12.0'
|
@@ -100,11 +100,11 @@ module Fluent::Plugin
|
|
100
100
|
write_to_splunk(chunk)
|
101
101
|
end
|
102
102
|
|
103
|
-
@metrics[:record_counter].increment(metric_labels, chunk.size_of_events)
|
104
|
-
@metrics[:bytes_counter].increment(metric_labels, chunk.bytesize)
|
105
|
-
@metrics[:write_records_histogram].observe(
|
106
|
-
@metrics[:write_bytes_histogram].observe(metric_labels,
|
107
|
-
@metrics[:write_latency_histogram].observe(metric_labels,
|
103
|
+
@metrics[:record_counter].increment(labels: metric_labels, by: chunk.size_of_events)
|
104
|
+
@metrics[:bytes_counter].increment(labels: metric_labels, by: chunk.bytesize)
|
105
|
+
@metrics[:write_records_histogram].observe(chunk.size_of_events, labels: metric_labels)
|
106
|
+
@metrics[:write_bytes_histogram].observe(chunk.bytesize, labels: metric_labels, )
|
107
|
+
@metrics[:write_latency_histogram].observe(t, labels: metric_labels, )
|
108
108
|
end
|
109
109
|
|
110
110
|
def write_to_splunk(_chunk)
|
@@ -153,7 +153,7 @@ module Fluent::Plugin
|
|
153
153
|
def process_response(response, _request_body)
|
154
154
|
log.trace { "[Response] POST #{@api}: #{response.inspect}" }
|
155
155
|
|
156
|
-
@metrics[:status_counter].increment(metric_labels(status: response.code.to_s))
|
156
|
+
@metrics[:status_counter].increment(labels: metric_labels(status: response.code.to_s))
|
157
157
|
|
158
158
|
raise_err = response.code.to_s.start_with?('5') || (!@consume_chunk_on_4xx_errors && response.code.to_s.start_with?('4'))
|
159
159
|
|
@@ -235,28 +235,34 @@ module Fluent::Plugin
|
|
235
235
|
|
236
236
|
@metrics = {
|
237
237
|
record_counter: register_metric(::Prometheus::Client::Counter.new(
|
238
|
-
:splunk_output_write_records_count,
|
239
|
-
'The number of log records being sent'
|
238
|
+
:splunk_output_write_records_count, docstring:
|
239
|
+
'The number of log records being sent',
|
240
|
+
labels: metric_label_keys
|
240
241
|
)),
|
241
242
|
bytes_counter: register_metric(::Prometheus::Client::Counter.new(
|
242
|
-
:splunk_output_write_bytes_count,
|
243
|
-
'The number of log bytes being sent'
|
243
|
+
:splunk_output_write_bytes_count, docstring:
|
244
|
+
'The number of log bytes being sent',
|
245
|
+
labels: metric_label_keys
|
244
246
|
)),
|
245
247
|
status_counter: register_metric(::Prometheus::Client::Counter.new(
|
246
|
-
:splunk_output_write_status_count,
|
247
|
-
'The count of sends by response_code'
|
248
|
+
:splunk_output_write_status_count, docstring:
|
249
|
+
'The count of sends by response_code',
|
250
|
+
labels: metric_label_keys(status: "")
|
248
251
|
)),
|
249
252
|
write_bytes_histogram: register_metric(::Prometheus::Client::Histogram.new(
|
250
|
-
:splunk_output_write_payload_bytes,
|
251
|
-
'The size of the write payload in bytes',
|
253
|
+
:splunk_output_write_payload_bytes, docstring:
|
254
|
+
'The size of the write payload in bytes', buckets: [1024, 23_937, 47_875, 95_750, 191_500, 383_000, 766_000, 1_149_000],
|
255
|
+
labels: metric_label_keys
|
252
256
|
)),
|
253
257
|
write_records_histogram: register_metric(::Prometheus::Client::Histogram.new(
|
254
|
-
:splunk_output_write_payload_records,
|
255
|
-
'The number of records written per write',
|
258
|
+
:splunk_output_write_payload_records, docstring:
|
259
|
+
'The number of records written per write', buckets: [1, 10, 25, 100, 200, 300, 500, 750, 1000, 1500],
|
260
|
+
labels: metric_label_keys
|
256
261
|
)),
|
257
262
|
write_latency_histogram: register_metric(::Prometheus::Client::Histogram.new(
|
258
|
-
:splunk_output_write_latency_seconds,
|
259
|
-
'The latency of writes'
|
263
|
+
:splunk_output_write_latency_seconds, docstring:
|
264
|
+
'The latency of writes',
|
265
|
+
labels: metric_label_keys
|
260
266
|
))
|
261
267
|
}
|
262
268
|
end
|
@@ -266,6 +272,10 @@ module Fluent::Plugin
|
|
266
272
|
@metric_labels.merge other_labels
|
267
273
|
end
|
268
274
|
|
275
|
+
def metric_label_keys(other_labels = {})
|
276
|
+
(@metric_labels.merge other_labels).keys
|
277
|
+
end
|
278
|
+
|
269
279
|
# Encode as UTF-8. If 'coerce_to_utf8' is set to true in the config, any
|
270
280
|
# non-UTF-8 character would be replaced by the string specified by
|
271
281
|
# 'non_utf8_replacement_string'. If 'coerce_to_utf8' is set to false, any
|
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.
|
4
|
+
version: 1.2.7
|
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-
|
11
|
+
date: 2021-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|
@@ -70,16 +70,16 @@ dependencies:
|
|
70
70
|
name: prometheus-client
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 2.1.0
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 2.1.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: bundler
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|