fluent-plugin-input-opensearch 1.1.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +7 -0
  2. data/.coveralls.yml +1 -0
  3. data/.editorconfig +9 -0
  4. data/.github/ISSUE_TEMPLATE/bug_report.md +29 -0
  5. data/.github/ISSUE_TEMPLATE/feature_request.md +24 -0
  6. data/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md +9 -0
  7. data/.github/workflows/coverage.yaml +22 -0
  8. data/.github/workflows/issue-auto-closer.yml +12 -0
  9. data/.github/workflows/linux.yml +26 -0
  10. data/.github/workflows/macos.yml +26 -0
  11. data/.github/workflows/windows.yml +26 -0
  12. data/.gitignore +18 -0
  13. data/CONTRIBUTING.md +24 -0
  14. data/Gemfile +10 -0
  15. data/History.md +67 -0
  16. data/LICENSE.txt +201 -0
  17. data/README.OpenSearchGenID.md +116 -0
  18. data/README.OpenSearchInput.md +314 -0
  19. data/README.Troubleshooting.md +482 -0
  20. data/README.md +1622 -0
  21. data/Rakefile +37 -0
  22. data/fluent-plugin-opensearch.gemspec +39 -0
  23. data/gemfiles/Gemfile.elasticsearch.v6 +12 -0
  24. data/lib/fluent/log-ext.rb +64 -0
  25. data/lib/fluent/plugin/filter_opensearch_genid.rb +103 -0
  26. data/lib/fluent/plugin/in_opensearch.rb +410 -0
  27. data/lib/fluent/plugin/oj_serializer.rb +48 -0
  28. data/lib/fluent/plugin/opensearch_constants.rb +39 -0
  29. data/lib/fluent/plugin/opensearch_error.rb +31 -0
  30. data/lib/fluent/plugin/opensearch_error_handler.rb +182 -0
  31. data/lib/fluent/plugin/opensearch_fallback_selector.rb +36 -0
  32. data/lib/fluent/plugin/opensearch_index_template.rb +155 -0
  33. data/lib/fluent/plugin/opensearch_simple_sniffer.rb +36 -0
  34. data/lib/fluent/plugin/opensearch_tls.rb +96 -0
  35. data/lib/fluent/plugin/out_opensearch.rb +1158 -0
  36. data/lib/fluent/plugin/out_opensearch_data_stream.rb +229 -0
  37. data/test/helper.rb +60 -0
  38. data/test/plugin/datastream_template.json +4 -0
  39. data/test/plugin/test_alias_template.json +9 -0
  40. data/test/plugin/test_filter_opensearch_genid.rb +241 -0
  41. data/test/plugin/test_in_opensearch.rb +500 -0
  42. data/test/plugin/test_index_alias_template.json +11 -0
  43. data/test/plugin/test_index_template.json +25 -0
  44. data/test/plugin/test_oj_serializer.rb +45 -0
  45. data/test/plugin/test_opensearch_error_handler.rb +770 -0
  46. data/test/plugin/test_opensearch_fallback_selector.rb +100 -0
  47. data/test/plugin/test_opensearch_tls.rb +171 -0
  48. data/test/plugin/test_out_opensearch.rb +3980 -0
  49. data/test/plugin/test_out_opensearch_data_stream.rb +746 -0
  50. data/test/plugin/test_template.json +23 -0
  51. data/test/test_log-ext.rb +61 -0
  52. metadata +291 -0
@@ -0,0 +1,23 @@
1
+ {
2
+ "template": "te*",
3
+ "settings": {
4
+ "number_of_shards": 1
5
+ },
6
+ "mappings": {
7
+ "type1": {
8
+ "_source": {
9
+ "enabled": false
10
+ },
11
+ "properties": {
12
+ "host_name": {
13
+ "type": "string",
14
+ "index": "not_analyzed"
15
+ },
16
+ "created_at": {
17
+ "type": "date",
18
+ "format": "EEE MMM dd HH:mm:ss Z YYYY"
19
+ }
20
+ }
21
+ }
22
+ }
23
+ }
@@ -0,0 +1,61 @@
1
+ # SPDX-License-Identifier: Apache-2.0
2
+ #
3
+ # The fluent-plugin-opensearch Contributors require contributions made to
4
+ # this file be licensed under the Apache-2.0 license or a
5
+ # compatible open source license.
6
+ #
7
+ # Modifications Copyright fluent-plugin-opensearch Contributors. See
8
+ # GitHub history for details.
9
+ #
10
+ # Licensed to Uken Inc. under one or more contributor
11
+ # license agreements. See the NOTICE file distributed with
12
+ # this work for additional information regarding copyright
13
+ # ownership. Uken Inc. licenses this file to you under
14
+ # the Apache License, Version 2.0 (the "License"); you may
15
+ # not use this file except in compliance with the License.
16
+ # You may obtain a copy of the License at
17
+ #
18
+ # http://www.apache.org/licenses/LICENSE-2.0
19
+ #
20
+ # Unless required by applicable law or agreed to in writing,
21
+ # software distributed under the License is distributed on an
22
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
23
+ # KIND, either express or implied. See the License for the
24
+ # specific language governing permissions and limitations
25
+ # under the License.
26
+
27
+ require 'helper'
28
+ require 'fluent/log-ext'
29
+
30
+ class TestFluentLogExtHandler < Test::Unit::TestCase
31
+ def setup
32
+ @log_device = Fluent::Test::DummyLogDevice.new
33
+ dl_opts = {:log_level => ServerEngine::DaemonLogger::INFO}
34
+ logger = ServerEngine::DaemonLogger.new(@log_device, dl_opts)
35
+ @log = Fluent::Log.new(logger)
36
+ end
37
+
38
+ def test_trace?
39
+ assert_false @log.respond_to?(:trace?)
40
+ end
41
+
42
+ def test_debug?
43
+ assert_true @log.respond_to?(:debug?)
44
+ end
45
+
46
+ def test_info?
47
+ assert_true @log.respond_to?(:info?)
48
+ end
49
+
50
+ def test_warn?
51
+ assert_true @log.respond_to?(:warn?)
52
+ end
53
+
54
+ def test_error?
55
+ assert_true @log.respond_to?(:error?)
56
+ end
57
+
58
+ def test_fatal?
59
+ assert_true @log.respond_to?(:fatal?)
60
+ end
61
+ end
metadata ADDED
@@ -0,0 +1,291 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fluent-plugin-input-opensearch
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.1.9
5
+ platform: ruby
6
+ authors:
7
+ - imcotop
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2024-04-15 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: fluentd
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 0.14.22
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 0.14.22
27
+ - !ruby/object:Gem::Dependency
28
+ name: opensearch-ruby
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 3.0.1
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 3.0.1
41
+ - !ruby/object:Gem::Dependency
42
+ name: aws-sdk-core
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3'
55
+ - !ruby/object:Gem::Dependency
56
+ name: excon
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: faraday
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: 2.0.0
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: 2.0.0
83
+ - !ruby/object:Gem::Dependency
84
+ name: faraday-excon
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: 2.0.0
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: 2.0.0
97
+ - !ruby/object:Gem::Dependency
98
+ name: faraday_middleware-aws-sigv4
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: 1.0.1
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: 1.0.1
111
+ - !ruby/object:Gem::Dependency
112
+ name: rake
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: webrick
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: 1.7.0
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: 1.7.0
139
+ - !ruby/object:Gem::Dependency
140
+ name: webmock
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: 3.18.1
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: 3.18.1
153
+ - !ruby/object:Gem::Dependency
154
+ name: test-unit
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: 3.3.0
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: 3.3.0
167
+ - !ruby/object:Gem::Dependency
168
+ name: minitest
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: '5.8'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - "~>"
179
+ - !ruby/object:Gem::Version
180
+ version: '5.8'
181
+ - !ruby/object:Gem::Dependency
182
+ name: flexmock
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - "~>"
186
+ - !ruby/object:Gem::Version
187
+ version: '2.0'
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - "~>"
193
+ - !ruby/object:Gem::Version
194
+ version: '2.0'
195
+ description: Opensearch output plugin for Fluent event collector
196
+ email:
197
+ - imcotop@icloud.com
198
+ executables: []
199
+ extensions: []
200
+ extra_rdoc_files: []
201
+ files:
202
+ - ".coveralls.yml"
203
+ - ".editorconfig"
204
+ - ".github/ISSUE_TEMPLATE/bug_report.md"
205
+ - ".github/ISSUE_TEMPLATE/feature_request.md"
206
+ - ".github/PULL_REQUEST_TEMPLATE/pull_request_template.md"
207
+ - ".github/workflows/coverage.yaml"
208
+ - ".github/workflows/issue-auto-closer.yml"
209
+ - ".github/workflows/linux.yml"
210
+ - ".github/workflows/macos.yml"
211
+ - ".github/workflows/windows.yml"
212
+ - ".gitignore"
213
+ - CONTRIBUTING.md
214
+ - Gemfile
215
+ - History.md
216
+ - LICENSE.txt
217
+ - README.OpenSearchGenID.md
218
+ - README.OpenSearchInput.md
219
+ - README.Troubleshooting.md
220
+ - README.md
221
+ - Rakefile
222
+ - fluent-plugin-opensearch.gemspec
223
+ - gemfiles/Gemfile.elasticsearch.v6
224
+ - lib/fluent/log-ext.rb
225
+ - lib/fluent/plugin/filter_opensearch_genid.rb
226
+ - lib/fluent/plugin/in_opensearch.rb
227
+ - lib/fluent/plugin/oj_serializer.rb
228
+ - lib/fluent/plugin/opensearch_constants.rb
229
+ - lib/fluent/plugin/opensearch_error.rb
230
+ - lib/fluent/plugin/opensearch_error_handler.rb
231
+ - lib/fluent/plugin/opensearch_fallback_selector.rb
232
+ - lib/fluent/plugin/opensearch_index_template.rb
233
+ - lib/fluent/plugin/opensearch_simple_sniffer.rb
234
+ - lib/fluent/plugin/opensearch_tls.rb
235
+ - lib/fluent/plugin/out_opensearch.rb
236
+ - lib/fluent/plugin/out_opensearch_data_stream.rb
237
+ - test/helper.rb
238
+ - test/plugin/datastream_template.json
239
+ - test/plugin/test_alias_template.json
240
+ - test/plugin/test_filter_opensearch_genid.rb
241
+ - test/plugin/test_in_opensearch.rb
242
+ - test/plugin/test_index_alias_template.json
243
+ - test/plugin/test_index_template.json
244
+ - test/plugin/test_oj_serializer.rb
245
+ - test/plugin/test_opensearch_error_handler.rb
246
+ - test/plugin/test_opensearch_fallback_selector.rb
247
+ - test/plugin/test_opensearch_tls.rb
248
+ - test/plugin/test_out_opensearch.rb
249
+ - test/plugin/test_out_opensearch_data_stream.rb
250
+ - test/plugin/test_template.json
251
+ - test/test_log-ext.rb
252
+ homepage: https://github.com/fluent/fluent-plugin-opensearch
253
+ licenses:
254
+ - Apache-2.0
255
+ metadata:
256
+ changelog_uri: https://github.com/fluent/fluent-plugin-opensearch/blob/master/History.md
257
+ post_install_message:
258
+ rdoc_options: []
259
+ require_paths:
260
+ - lib
261
+ required_ruby_version: !ruby/object:Gem::Requirement
262
+ requirements:
263
+ - - ">="
264
+ - !ruby/object:Gem::Version
265
+ version: '2.3'
266
+ required_rubygems_version: !ruby/object:Gem::Requirement
267
+ requirements:
268
+ - - ">="
269
+ - !ruby/object:Gem::Version
270
+ version: '0'
271
+ requirements: []
272
+ rubygems_version: 3.5.7
273
+ signing_key:
274
+ specification_version: 4
275
+ summary: Opensearch output plugin for Fluent event collector
276
+ test_files:
277
+ - test/helper.rb
278
+ - test/plugin/datastream_template.json
279
+ - test/plugin/test_alias_template.json
280
+ - test/plugin/test_filter_opensearch_genid.rb
281
+ - test/plugin/test_in_opensearch.rb
282
+ - test/plugin/test_index_alias_template.json
283
+ - test/plugin/test_index_template.json
284
+ - test/plugin/test_oj_serializer.rb
285
+ - test/plugin/test_opensearch_error_handler.rb
286
+ - test/plugin/test_opensearch_fallback_selector.rb
287
+ - test/plugin/test_opensearch_tls.rb
288
+ - test/plugin/test_out_opensearch.rb
289
+ - test/plugin/test_out_opensearch_data_stream.rb
290
+ - test/plugin/test_template.json
291
+ - test/test_log-ext.rb