fluent-plugin-splunk-hec-radiant 0.1.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: d66f2e2c6b673ba7a5c901eef6c614343c4e47923c97040019c68a1c0c6dac38
4
+ data.tar.gz: 91e1407dd7bb1fa19ce1241c44175499c1060a5d6446ad3f1821f7bd12b5d683
5
+ SHA512:
6
+ metadata.gz: ee16c5e206a22e0976021b7962498c907c94ef02c5713593a9152b0e829ec0163c37c2ef75210cdfb6c0960407f867d9bb22982d26595b263d3fc3fddc2fb7d9
7
+ data.tar.gz: ec7a37f5090bbe1eb6b2627e944c8e16dc8a8aaa937940cb864ecfd1d189483aaee7908d64d27bccf3c978048e7b86946cfd8ccf21d9143c3f0d87868bb1ae18
data/Gemfile ADDED
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in fluent-plugin-splunk-hec-radiant.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+ gem "rspec", "~> 3.0"
10
+ gem "rubocop", "~> 1.60"
11
+ gem "rubocop-rspec", "~> 3.0"
data/LICENSE ADDED
@@ -0,0 +1,301 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "{}"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2018 Splunk Inc.
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
202
+
203
+ =======================================================================
204
+ Fluentd Plugin for Splunk HEC:
205
+
206
+ The Fluentd Plugin for Splunk HTTP Event Collector project contains
207
+ subcomponents with separate copyright notices and license terms.
208
+ Your use of the source code for the these subcomponents is subject
209
+ to the terms and conditions of the following licenses.
210
+
211
+ ========================================================================
212
+ Apache License 2.0
213
+ ========================================================================
214
+ The following components are provided under the Apache License 2.0. See project link for details.
215
+
216
+ (Apache License 2.0) fluentd (https://github.com/fluent/fluentd/blob/master/LICENSE)
217
+ (Apache License 2.0) ffi-compiler (https://github.com/ffi/ffi-compiler/blob/master/LICENSE)
218
+ (Apache License 2.0) msgpack (https://github.com/msgpack/msgpack-ruby/blob/master/LICENSE)
219
+ (Apache License 2.0) prometheus-client (https://github.com/prometheus/client_ruby/blob/master/LICENSE)
220
+ (Apache License 2.0) quantile (https://github.com/matttproud/ruby_quantile_estimation/blob/master/LICENSE)
221
+ (Apache License 2.0) serverengine (https://github.com/treasure-data/serverengine/blob/master/LICENSE)
222
+ (Apache License 2.0) addressable (https://github.com/sporkmonger/addressable/blob/master/LICENSE.txt)
223
+ (Apache License 2.0) fluent-plugin-kubernetes_metadata_filter (https://github.com/fabric8io/fluent-plugin-kubernetes_metadata_filter/blob/master/LICENSE.txt)
224
+ (Apache License 2.0) thread_safe (https://github.com/ruby-concurrency/thread_safe/blob/master/LICENSE)
225
+
226
+ ========================================================================
227
+ MIT licenses
228
+ ========================================================================
229
+ The following components are provided under the MIT License. See project link for details.
230
+
231
+ (MIT License) activemodel (https://github.com/rails/rails/blob/v6.0.2.1/activemodel/MIT-LICENSE)
232
+ (MIT License) activesupport (https://github.com/rails/rails/blob/v6.0.2.1/activesupport/MIT-LICENSE)
233
+ (MIT License) aes_key_wrap (https://github.com/tomdalling/aes_key_wrap/blob/master/LICENSE.txt)
234
+ (MIT License) ast (https://github.com/whitequark/ast/blob/master/LICENSE.MIT)
235
+ (MIT License) attr_required (https://github.com/nov/attr_required/blob/master/LICENSE)
236
+ (MIT License) bundler (https://github.com/bundler/bundler/blob/master/LICENSE.md)
237
+ (MIT License) concurrent-ruby (https://github.com/ruby-concurrency/concurrent-ruby/blob/master/LICENSE.md)
238
+ (MIT License) connection_pool (https://github.com/mperham/connection_pool/blob/master/LICENSE)
239
+ (MIT License) cool.io (https://github.com/tarcieri/cool.io/blob/master/LICENSE)
240
+ (MIT License) crack (https://github.com/jnunemaker/crack/blob/master/LICENSE)
241
+ (MIT License) docile (https://github.com/ms-ati/docile/blob/master/LICENSE)
242
+ (MIT License) hashdiff (https://github.com/liufengyun/hashdiff/blob/master/LICENSE)
243
+ (MIT License) http (https://github.com/httprb/http/blob/master/LICENSE.txt)
244
+ (MIT License) http_parser.rb (https://github.com/tmm1/http_parser.rb/blob/master/LICENSE-MIT)
245
+ (MIT License) http-accept (https://github.com/socketry/http-accept#license)
246
+ (MIT License) http-cookie (https://github.com/sparklemotion/http-cookie/blob/master/LICENSE.txt)
247
+ (MIT License) http-form_data (https://github.com/httprb/form_data/blob/master/LICENSE.txt)
248
+ (MIT License) http-parser (https://github.com/cotag/http-parser/blob/master/LICENSE)
249
+ (MIT License) i18n (https://github.com/ruby-i18n/i18n/blob/master/MIT-LICENSE)
250
+ (MIT License) jaro_winkler (https://github.com/tonytonyjan/jaro_winkler/blob/master/LICENSE.txt)
251
+ (MIT License) json-jwt (https://github.com/tonytonyjan/jaro_winkler/blob/master/LICENSE.txt)
252
+ (MIT License) kubeclient (https://github.com/abonas/kubeclient/blob/master/LICENSE.txt)
253
+ (MIT License) lru_redux (https://github.com/SamSaffron/lru_redux/blob/master/LICENSE.txt)
254
+ (MIT License) mail (https://github.com/mikel/mail/blob/master/MIT-LICENSE)
255
+ (MIT License) mime-types (https://github.com/mime-types/ruby-mime-types/blob/master/Licence.md)
256
+ (MIT License) mime-types-data (https://github.com/mime-types/mime-types-data/blob/master/Licence.md)
257
+ (MIT License) mini_mime (https://github.com/discourse/mini_mime/blob/master/LICENSE.txt)
258
+ (MIT License) minitest (https://github.com/seattlerb/minitest)
259
+ (MIT License) multi_json (https://github.com/intridea/multi_json/blob/master/LICENSE.md)
260
+ (MIT License) net-http-persistent (https://github.com/drbrain/net-http-persistent)
261
+ (MIT License) netrc (https://github.com/heroku/netrc/blob/master/LICENSE.md)
262
+ (MIT License) openid_connect (https://github.com/nov/openid_connect/blob/master/LICENSE)
263
+ (MIT License) parallel (https://github.com/grosser/parallel/blob/master/MIT-LICENSE.txt)
264
+ (MIT License) parser (https://github.com/whitequark/parser/blob/master/LICENSE.txt)
265
+ (MIT License) powerpack (https://github.com/bbatsov/powerpack/blob/master/LICENSE.txt)
266
+ (MIT License) public_suffix (https://github.com/weppos/publicsuffix-ruby/blob/master/LICENSE.txt)
267
+ (MIT License) rack (https://github.com/rack/rack/blob/master/MIT-LICENSE)
268
+ (MIT License) rack-oauth2 (https://github.com/nov/rack-oauth2/blob/master/LICENSE)
269
+ (MIT License) rainbow (https://github.com/sickill/rainbow/blob/master/LICENSE)
270
+ (MIT License) rake (https://github.com/ruby/rake/blob/master/MIT-LICENSE)
271
+ (MIT License) recursive-open-struct (https://github.com/aetherknight/recursive-open-struct/blob/master/LICENSE.txt)
272
+ (MIT License) rest-client (https://github.com/rest-client/rest-client/blob/master/LICENSE)
273
+ (MIT License) ruby-progressbar (https://github.com/jfelchner/ruby-progressbar/blob/master/LICENSE.txt)
274
+ (MIT License) safe_yaml (https://github.com/dtao/safe_yaml/blob/master/LICENSE.txt)
275
+ (MIT License) sigdump (https://github.com/frsyuki/sigdump/blob/master/LICENSE)
276
+ (MIT License) simplecov (https://github.com/colszowka/simplecov/blob/master/LICENSE)
277
+ (MIT License) simplecov-html (https://github.com/colszowka/simplecov-html/blob/master/LICENSE)
278
+ (MIT License) swd (https://github.com/nov/SWD/blob/master/LICENSE)
279
+ (MIT License) tzinfo (https://github.com/tzinfo/tzinfo/blob/master/LICENSE)
280
+ (MIT License) tzinfo-data (https://github.com/tzinfo/tzinfo-data/blob/master/LICENSE)
281
+ (MIT License) unf_ext (https://github.com/knu/ruby-unf_ext/blob/master/LICENSE.txt)
282
+ (MIT License) unicode-display_width (https://github.com/janlelis/unicode-display_width/blob/master/MIT-LICENSE.txt)
283
+ (MIT License) validate_email (https://github.com/perfectline/validates_email/blob/master/MIT-LICENSE)
284
+ (MIT License) validate_url (https://github.com/perfectline/validates_url/blob/master/LICENSE.md)
285
+ (MIT License) webfinger (https://github.com/nov/webfinger/blob/master/LICENSE.txt)
286
+ (MIT License) webmock (https://github.com/bblimke/webmock/blob/master/LICENSE)
287
+ (MIT License) yajl-ruby (https://github.com/brianmario/yajl-ruby/blob/master/LICENSE)
288
+
289
+ ========================================================================
290
+ For the rest:
291
+ ========================================================================
292
+
293
+ bindata (https://github.com/dmendel/bindata/blob/master/COPYING)
294
+ httpclient (https://github.com/nahi/httpclient/#license)
295
+ json (https://www.ruby-lang.org/en/about/license.txt)
296
+ test-unit (https://github.com/test-unit/test-unit)
297
+ unf (https://github.com/knu/ruby-unf/blob/master/LICENSE)
298
+ power_assert (https://github.com/k-tsj/power_assert/blob/master/BSDL)
299
+ strptime (https://github.com/nurse/strptime/blob/master/LICENSE.txt)
300
+ domain_name (https://github.com/knu/ruby-domain_name/blob/master/LICENSE.txt)
301
+ ffi (https://github.com/ffi/ffi/blob/master/LICENSE)
data/NOTICE ADDED
@@ -0,0 +1,18 @@
1
+ fluent-plugin-splunk-hec-radiant
2
+ Copyright 2025 G. Rahul Nutakki
3
+
4
+ This product includes software developed by Splunk Inc. (https://www.splunk.com/).
5
+
6
+ This is a derivative work based on fluent-plugin-splunk-hec:
7
+ https://github.com/splunk/fluentd-hec
8
+ Copyright 2018 Splunk Inc.
9
+ Licensed under the Apache License, Version 2.0
10
+
11
+ Significant modifications include:
12
+ - Modernized dependencies (Ruby 3.x, latest gems)
13
+ - Replaced multi_json with oj for better performance
14
+ - Updated TLS minimum version from 1.1 to 1.2
15
+ - Improved error handling and logging
16
+ - Updated to work with latest Fluentd versions (1.16+)
17
+ - Code refactoring for Ruby 3.x compatibility
18
+ - Enhanced test coverage and CI/CD
data/README.md ADDED
@@ -0,0 +1,315 @@
1
+ # fluent-plugin-splunk-hec-radiant
2
+
3
+ [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
4
+ [![Ruby](https://img.shields.io/badge/ruby-3.0+-red.svg)](https://www.ruby-lang.org)
5
+
6
+ A **modernized and actively maintained** Fluentd output plugin for sending events and metrics to [Splunk](https://www.splunk.com) via the [HTTP Event Collector (HEC) API](http://dev.splunk.com/view/event-collector/SP-CAAAE7F).
7
+
8
+ This is a fork of the original [fluent-plugin-splunk-hec](https://github.com/splunk/fluentd-hec) by Splunk Inc., which has reached end-of-support. This version includes:
9
+
10
+ - ✅ **Ruby 3.x support** (requires Ruby 3.0+)
11
+ - ✅ **Modern dependencies** (Fluentd 1.16+, latest gems)
12
+ - ✅ **Better performance** (using `oj` for JSON instead of `multi_json`)
13
+ - ✅ **Enhanced security** (TLS 1.2+ by default)
14
+ - ✅ **Active maintenance** and bug fixes
15
+ - ✅ **Comprehensive test coverage**
16
+
17
+ ## Installation
18
+
19
+ ### RubyGems
20
+
21
+ ```bash
22
+ gem install fluent-plugin-splunk-hec-radiant
23
+ ```
24
+
25
+ ### Bundler
26
+
27
+ Add to your `Gemfile`:
28
+
29
+ ```ruby
30
+ gem "fluent-plugin-splunk-hec-radiant"
31
+ ```
32
+
33
+ Then run:
34
+
35
+ ```bash
36
+ bundle install
37
+ ```
38
+
39
+ ### td-agent
40
+
41
+ ```bash
42
+ td-agent-gem install fluent-plugin-splunk-hec-radiant
43
+ ```
44
+
45
+ ## Configuration
46
+
47
+ The plugin is registered as `@type splunk_hec_radiant`.
48
+
49
+ ### Basic Configuration
50
+
51
+ ```xml
52
+ <match **>
53
+ @type splunk_hec_radiant
54
+ hec_host 12.34.56.78
55
+ hec_port 8088
56
+ hec_token 00000000-0000-0000-0000-000000000000
57
+ </match>
58
+ ```
59
+
60
+ This sends events to Splunk HEC at `https://12.34.56.78:8088` using the specified token.
61
+
62
+ ### Full Configuration Example
63
+
64
+ ```xml
65
+ <match **>
66
+ @type splunk_hec_radiant
67
+
68
+ # HEC endpoint configuration
69
+ protocol https
70
+ hec_host splunk.example.com
71
+ hec_port 8088
72
+ hec_token "#{ENV['SPLUNK_HEC_TOKEN']}"
73
+ hec_endpoint services/collector
74
+
75
+ # Splunk indexing parameters
76
+ index main
77
+ source ${tag}
78
+ sourcetype _json
79
+ host myapp-server-01
80
+
81
+ # TLS/SSL configuration
82
+ insecure_ssl false
83
+ require_ssl_min_version true # Enforces TLS 1.2+
84
+ ca_file /path/to/ca_bundle.crt
85
+ # client_cert /path/to/client.crt
86
+ # client_key /path/to/client.key
87
+
88
+ # Performance tuning
89
+ gzip_compression true
90
+ idle_timeout 5
91
+ open_timeout 10
92
+ read_timeout 10
93
+
94
+ # Error handling
95
+ consume_chunk_on_4xx_errors true
96
+ coerce_to_utf8 true
97
+ non_utf8_replacement_string " "
98
+
99
+ # Custom headers
100
+ <custom_headers>
101
+ X-Custom-Header value
102
+ </custom_headers>
103
+
104
+ # Index-time fields
105
+ <fields>
106
+ environment production
107
+ application myapp
108
+ </fields>
109
+ </match>
110
+ ```
111
+
112
+ ### Sending Metrics
113
+
114
+ To send metrics to a Splunk metrics index (Splunk 7.0+):
115
+
116
+ ```xml
117
+ <match metrics.**>
118
+ @type splunk_hec_radiant
119
+ data_type metric
120
+ hec_host splunk.example.com
121
+ hec_token "#{ENV['SPLUNK_HEC_TOKEN']}"
122
+ index metrics_index
123
+ </match>
124
+ ```
125
+
126
+ #### Metrics from Event Fields
127
+
128
+ ```xml
129
+ <match metrics.**>
130
+ @type splunk_hec_radiant
131
+ data_type metric
132
+ hec_host splunk.example.com
133
+ hec_token "#{ENV['SPLUNK_HEC_TOKEN']}"
134
+
135
+ metrics_from_event false
136
+ metric_name_key metric_name
137
+ metric_value_key metric_value
138
+ </match>
139
+ ```
140
+
141
+ ## Configuration Parameters
142
+
143
+ ### HEC Connection
144
+
145
+ | Parameter | Type | Default | Description |
146
+ |-----------|------|---------|-------------|
147
+ | `protocol` | enum | `https` | Protocol to use (`http` or `https`) |
148
+ | `hec_host` | string | - | Splunk HEC hostname or IP (required) |
149
+ | `hec_port` | integer | `8088` | Splunk HEC port |
150
+ | `hec_token` | string | - | HEC token (required, secret) |
151
+ | `hec_endpoint` | string | `services/collector` | HEC API endpoint path |
152
+ | `full_url` | string | - | Full HEC URL (alternative to host+port) |
153
+
154
+ ### TLS/SSL
155
+
156
+ | Parameter | Type | Default | Description |
157
+ |-----------|------|---------|-------------|
158
+ | `insecure_ssl` | bool | `false` | Allow insecure SSL connections |
159
+ | `require_ssl_min_version` | bool | `true` | Require TLS 1.2+ |
160
+ | `ca_file` | string | - | Path to CA certificate file |
161
+ | `ca_path` | string | - | Path to CA certificates directory |
162
+ | `client_cert` | string | - | Path to client certificate |
163
+ | `client_key` | string | - | Path to client private key |
164
+ | `ssl_ciphers` | array | - | List of allowed SSL ciphers |
165
+
166
+ ### Splunk Indexing
167
+
168
+ | Parameter | Type | Default | Description |
169
+ |-----------|------|---------|-------------|
170
+ | `data_type` | enum | `event` | Data type (`event` or `metric`) |
171
+ | `index` | string | - | Splunk index name |
172
+ | `index_key` | string | - | Field name containing index |
173
+ | `host` | string | hostname | Event host field |
174
+ | `host_key` | string | - | Field name containing host |
175
+ | `source` | string | - | Event source field |
176
+ | `source_key` | string | - | Field name containing source |
177
+ | `sourcetype` | string | - | Event sourcetype field |
178
+ | `sourcetype_key` | string | - | Field name containing sourcetype |
179
+ | `time_key` | string | - | Field name containing event time |
180
+
181
+ ### Performance
182
+
183
+ | Parameter | Type | Default | Description |
184
+ |-----------|------|---------|-------------|
185
+ | `gzip_compression` | bool | `false` | Enable gzip compression |
186
+ | `idle_timeout` | integer | `5` | Connection idle timeout (seconds) |
187
+ | `open_timeout` | integer | - | Connection open timeout (seconds) |
188
+ | `read_timeout` | integer | - | Read timeout (seconds) |
189
+
190
+ ### Other
191
+
192
+ | Parameter | Type | Default | Description |
193
+ |-----------|------|---------|-------------|
194
+ | `keep_keys` | bool | `false` | Keep extracted key fields in event |
195
+ | `coerce_to_utf8` | bool | `true` | Replace non-UTF-8 characters |
196
+ | `non_utf8_replacement_string` | string | `" "` | Replacement for non-UTF-8 chars |
197
+ | `consume_chunk_on_4xx_errors` | bool | `true` | Consume chunks on 4xx errors |
198
+ | `custom_headers` | hash | `{}` | Custom HTTP headers |
199
+
200
+ ## Migration from fluent-plugin-splunk-hec
201
+
202
+ This plugin is designed as a **drop-in replacement** for the original `fluent-plugin-splunk-hec`. To migrate:
203
+
204
+ 1. **Update your Gemfile or installation**:
205
+ ```ruby
206
+ # Old
207
+ # gem "fluent-plugin-splunk-hec"
208
+
209
+ # New
210
+ gem "fluent-plugin-splunk-hec-radiant"
211
+ ```
212
+
213
+ 2. **Update your Fluentd configuration**:
214
+ ```xml
215
+ <match **>
216
+ # Old
217
+ # @type splunk_hec
218
+
219
+ # New
220
+ @type splunk_hec_radiant
221
+
222
+ # ... rest of configuration remains the same
223
+ </match>
224
+ ```
225
+
226
+ 3. **Verify Ruby version**: Ensure you're running Ruby 3.0 or newer.
227
+
228
+ ### Breaking Changes
229
+
230
+ - **Ruby 2.x is no longer supported** - Ruby 3.0+ is required
231
+ - **TLS 1.0/1.1 disabled by default** - TLS 1.2+ is enforced when `require_ssl_min_version` is true
232
+ - **Dependency changes**: Uses `oj` instead of `multi_json` (transparent to users)
233
+
234
+ ## Development
235
+
236
+ ### Prerequisites
237
+
238
+ - Ruby 3.0 or newer
239
+ - Bundler 2.0+
240
+ - Git
241
+
242
+ ### Setup
243
+
244
+ ```bash
245
+ git clone https://github.com/gnanirahulnutakki/fluent-plugin-splunk-hec-radiant.git
246
+ cd fluent-plugin-splunk-hec-radiant
247
+ bundle install
248
+ ```
249
+
250
+ ### Running Tests
251
+
252
+ ```bash
253
+ bundle exec rspec
254
+ ```
255
+
256
+ ### Linting
257
+
258
+ ```bash
259
+ bundle exec rubocop
260
+ ```
261
+
262
+ ### Building the Gem
263
+
264
+ ```bash
265
+ bundle exec rake build
266
+ ```
267
+
268
+ The gem will be created in the `pkg/` directory.
269
+
270
+ ## Contributing
271
+
272
+ Contributions are welcome! Please:
273
+
274
+ 1. Fork the repository
275
+ 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
276
+ 3. Commit your changes (`git commit -m 'Add amazing feature'`)
277
+ 4. Push to the branch (`git push origin feature/amazing-feature`)
278
+ 5. Open a Pull Request
279
+
280
+ Please ensure:
281
+ - Tests pass (`bundle exec rspec`)
282
+ - Code passes linting (`bundle exec rubocop`)
283
+ - New features include tests
284
+ - Documentation is updated
285
+
286
+ ## License
287
+
288
+ Copyright 2025 G. Rahul Nutakki
289
+ Copyright 2018 Splunk Inc.
290
+
291
+ Licensed under the Apache License, Version 2.0 (the "License");
292
+ you may not use this file except in compliance with the License.
293
+ You may obtain a copy of the License at
294
+
295
+ http://www.apache.org/licenses/LICENSE-2.0
296
+
297
+ Unless required by applicable law or agreed to in writing, software
298
+ distributed under the License is distributed on an "AS IS" BASIS,
299
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
300
+ See the License for the specific language governing permissions and
301
+ limitations under the License.
302
+
303
+ ## Attribution
304
+
305
+ This project is a derivative work of [fluent-plugin-splunk-hec](https://github.com/splunk/fluentd-hec) by Splunk Inc., which has reached end-of-support. See [NOTICE](NOTICE) for full attribution details.
306
+
307
+ ## Support
308
+
309
+ - **Issues**: [GitHub Issues](https://github.com/gnanirahulnutakki/fluent-plugin-splunk-hec-radiant/issues)
310
+ - **Documentation**: [README.md](https://github.com/gnanirahulnutakki/fluent-plugin-splunk-hec-radiant/blob/main/README.md)
311
+ - **Original Plugin**: [Splunk fluentd-hec](https://github.com/splunk/fluentd-hec) (deprecated)
312
+
313
+ ## Changelog
314
+
315
+ See [CHANGELOG.md](CHANGELOG.md) for version history.
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+ require "rubocop/rake_task"
6
+
7
+ RSpec::Core::RakeTask.new(:spec)
8
+ RuboCop::RakeTask.new
9
+
10
+ task default: %i[rubocop spec]