fluent-plugin-splunk-enterprise 0.10.1 → 0.10.3
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/CHANGELOG.md +9 -0
- data/README.hec.md +7 -1
- data/fluent-plugin-splunk-enterprise.gemspec +1 -1
- data/lib/fluent/plugin/out_splunk_hec.rb +16 -2
- metadata +3 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ad554abb4e6186db6ab6a9354dfeff678bd637c0d34592d4f1788d38f75c88b0
|
|
4
|
+
data.tar.gz: 1696399b7d279981df465bb09f491ad14afc0e3a579c958c82468c2e000912b7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5cfbdadc415eca4f236b3d23e346ab8493587ceb543998dc1fc911888c8cd2410db9e204aaea5e7713534716d54e021acc0a45072abb1c36f5d1e70c86511aca
|
|
7
|
+
data.tar.gz: acda153e664dde3752e8c63e66878d15cc857a00e7f68114366e4dba46cb069c804ed6e205ca33dcc13b8de46c36984103e96e64d7843d8f91cb56bd1b1e967b
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
# Release v0.10.3 - 2026/04/30
|
|
2
|
+
|
|
3
|
+
* out_splunk_hec: mask token value as secret (#43)
|
|
4
|
+
* out_splunk_hec: Discard empty events - Splunk hec gives an error if the string is empty. This can lead to a retry loop. (#38)
|
|
5
|
+
|
|
6
|
+
# Release v0.10.2 - 2020/03/04
|
|
7
|
+
|
|
8
|
+
* out_splunk_hec: Add `auto_generate_channel` parameter
|
|
9
|
+
|
|
1
10
|
# Release v0.10.1 - 2020/03/03
|
|
2
11
|
|
|
3
12
|
* output: Support v1 multi-workers
|
data/README.hec.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* [token (required)](#token-required)
|
|
11
11
|
* [default_host](#default_host)
|
|
12
12
|
* [host_key](#host_key)
|
|
13
|
-
* [
|
|
13
|
+
* [default_source](#default_source)
|
|
14
14
|
* [source_key](#source_key)
|
|
15
15
|
* [default_index](#default_index)
|
|
16
16
|
* [index_key](#index_key)
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
* [time_as_integer](#time_as_integer)
|
|
23
23
|
* [use_ack](#use_ack)
|
|
24
24
|
* [channel](#channel)
|
|
25
|
+
* [auto_generate_channel](#auto_generate_channel)
|
|
25
26
|
* [ack_interval](#ack_interval)
|
|
26
27
|
* [ack_retry_limit](#ack_retry_limit)
|
|
27
28
|
* [raw](#raw)
|
|
@@ -151,6 +152,11 @@ Enable/Disable [Indexer acknowledgement](https://www.google.co.jp/search?q=splun
|
|
|
151
152
|
This is used as [channel identifier](http://dev.splunk.com/view/event-collector/SP-CAAAE8X#aboutchannels).
|
|
152
153
|
When you set `use_ack` or `raw`, this parameter is required.
|
|
153
154
|
|
|
155
|
+
### auto_generate_channel
|
|
156
|
+
The default: `false`
|
|
157
|
+
|
|
158
|
+
This is used as auto generate channel, channel param is ignored if this param is set to true.
|
|
159
|
+
|
|
154
160
|
### ack_interval
|
|
155
161
|
|
|
156
162
|
The default: `1`
|
|
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
|
4
4
|
|
|
5
5
|
Gem::Specification.new do |spec|
|
|
6
6
|
spec.name = "fluent-plugin-splunk-enterprise"
|
|
7
|
-
spec.version = "0.10.
|
|
7
|
+
spec.version = "0.10.3"
|
|
8
8
|
spec.authors = ["Yuki Ito", "Masahiro Nakagawa"]
|
|
9
9
|
spec.email = ["yito@treasure-data.com", "repeatedly@gmail.com"]
|
|
10
10
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
require 'fluent/output'
|
|
2
2
|
require 'httpclient'
|
|
3
3
|
require 'json'
|
|
4
|
+
require 'securerandom'
|
|
4
5
|
|
|
5
6
|
# http://dev.splunk.com/view/event-collector/SP-CAAAE6P
|
|
6
7
|
|
|
@@ -10,7 +11,7 @@ module Fluent
|
|
|
10
11
|
|
|
11
12
|
config_param :host, :string
|
|
12
13
|
config_param :port, :integer
|
|
13
|
-
config_param :token, :string
|
|
14
|
+
config_param :token, :string, secret: true
|
|
14
15
|
|
|
15
16
|
# for metadata
|
|
16
17
|
config_param :default_host, :string, default: nil
|
|
@@ -31,6 +32,7 @@ module Fluent
|
|
|
31
32
|
# for Indexer acknowledgement
|
|
32
33
|
config_param :use_ack, :bool, default: false
|
|
33
34
|
config_param :channel, :string, default: nil
|
|
35
|
+
config_param :auto_generate_channel, :bool, default: false
|
|
34
36
|
config_param :ack_interval, :integer, default: 1
|
|
35
37
|
config_param :ack_retry_limit, :integer, default: 3
|
|
36
38
|
|
|
@@ -51,6 +53,13 @@ module Fluent
|
|
|
51
53
|
|
|
52
54
|
def configure(conf)
|
|
53
55
|
super
|
|
56
|
+
|
|
57
|
+
if @channel && @auto_generate_channel
|
|
58
|
+
log.warn "Both channel and auto_generate_channel are set.. ignoring channel param and auto generating channel instead"
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
@channel = SecureRandom.uuid if @auto_generate_channel
|
|
62
|
+
|
|
54
63
|
raise ConfigError, "'channel' parameter is required when 'use_ack' is true" if @use_ack && !@channel
|
|
55
64
|
raise ConfigError, "'ack_interval' parameter must be a non negative integer" if @use_ack && @ack_interval < 0
|
|
56
65
|
raise ConfigError, "'event_key' parameter is required when 'raw' is true" if @raw && !@event_key
|
|
@@ -144,7 +153,12 @@ module Fluent
|
|
|
144
153
|
end
|
|
145
154
|
|
|
146
155
|
def format_event_raw(record)
|
|
147
|
-
|
|
156
|
+
if record[@event_key] and not record[@event_key].strip.empty?
|
|
157
|
+
record[@event_key] + @line_breaker
|
|
158
|
+
else
|
|
159
|
+
log.debug "Discarding empty line"
|
|
160
|
+
''
|
|
161
|
+
end
|
|
148
162
|
end
|
|
149
163
|
|
|
150
164
|
def post(path, body, query = {})
|
metadata
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fluent-plugin-splunk-enterprise
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.10.
|
|
4
|
+
version: 0.10.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yuki Ito
|
|
8
8
|
- Masahiro Nakagawa
|
|
9
|
-
autorequire:
|
|
10
9
|
bindir: exe
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date:
|
|
11
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: fluentd
|
|
@@ -121,7 +120,6 @@ homepage: ''
|
|
|
121
120
|
licenses:
|
|
122
121
|
- Apache-2.0
|
|
123
122
|
metadata: {}
|
|
124
|
-
post_install_message:
|
|
125
123
|
rdoc_options: []
|
|
126
124
|
require_paths:
|
|
127
125
|
- lib
|
|
@@ -136,8 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
136
134
|
- !ruby/object:Gem::Version
|
|
137
135
|
version: '0'
|
|
138
136
|
requirements: []
|
|
139
|
-
rubygems_version:
|
|
140
|
-
signing_key:
|
|
137
|
+
rubygems_version: 4.0.6
|
|
141
138
|
specification_version: 4
|
|
142
139
|
summary: Splunk output plugin for Fluentd
|
|
143
140
|
test_files: []
|