logstash-integration-aws 7.1.1-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.PRE.MERGE.md +658 -0
  3. data/CHANGELOG.md +33 -0
  4. data/CONTRIBUTORS +40 -0
  5. data/Gemfile +11 -0
  6. data/LICENSE +202 -0
  7. data/NOTICE.TXT +5 -0
  8. data/README.md +205 -0
  9. data/VERSION +1 -0
  10. data/docs/codec-cloudfront.asciidoc +53 -0
  11. data/docs/codec-cloudtrail.asciidoc +45 -0
  12. data/docs/index.asciidoc +36 -0
  13. data/docs/input-cloudwatch.asciidoc +320 -0
  14. data/docs/input-s3.asciidoc +346 -0
  15. data/docs/input-sqs.asciidoc +287 -0
  16. data/docs/output-cloudwatch.asciidoc +321 -0
  17. data/docs/output-s3.asciidoc +442 -0
  18. data/docs/output-sns.asciidoc +166 -0
  19. data/docs/output-sqs.asciidoc +242 -0
  20. data/lib/logstash/codecs/cloudfront.rb +84 -0
  21. data/lib/logstash/codecs/cloudtrail.rb +47 -0
  22. data/lib/logstash/inputs/cloudwatch.rb +338 -0
  23. data/lib/logstash/inputs/s3.rb +466 -0
  24. data/lib/logstash/inputs/sqs.rb +196 -0
  25. data/lib/logstash/outputs/cloudwatch.rb +346 -0
  26. data/lib/logstash/outputs/s3/file_repository.rb +193 -0
  27. data/lib/logstash/outputs/s3/path_validator.rb +18 -0
  28. data/lib/logstash/outputs/s3/size_and_time_rotation_policy.rb +24 -0
  29. data/lib/logstash/outputs/s3/size_rotation_policy.rb +26 -0
  30. data/lib/logstash/outputs/s3/temporary_file.rb +114 -0
  31. data/lib/logstash/outputs/s3/temporary_file_factory.rb +126 -0
  32. data/lib/logstash/outputs/s3/time_rotation_policy.rb +26 -0
  33. data/lib/logstash/outputs/s3/uploader.rb +76 -0
  34. data/lib/logstash/outputs/s3/writable_directory_validator.rb +17 -0
  35. data/lib/logstash/outputs/s3/write_bucket_permission_validator.rb +60 -0
  36. data/lib/logstash/outputs/s3.rb +442 -0
  37. data/lib/logstash/outputs/sns.rb +133 -0
  38. data/lib/logstash/outputs/sqs.rb +167 -0
  39. data/lib/logstash/plugin_mixins/aws_config/generic.rb +54 -0
  40. data/lib/logstash/plugin_mixins/aws_config/v2.rb +93 -0
  41. data/lib/logstash/plugin_mixins/aws_config.rb +8 -0
  42. data/lib/logstash-integration-aws_jars.rb +4 -0
  43. data/lib/tasks/build.rake +15 -0
  44. data/logstash-integration-aws.gemspec +55 -0
  45. data/spec/codecs/cloudfront_spec.rb +92 -0
  46. data/spec/codecs/cloudtrail_spec.rb +56 -0
  47. data/spec/fixtures/aws_credentials_file_sample_test.yml +2 -0
  48. data/spec/fixtures/aws_temporary_credentials_file_sample_test.yml +3 -0
  49. data/spec/fixtures/cloudfront.log +4 -0
  50. data/spec/fixtures/compressed.log.gee.zip +0 -0
  51. data/spec/fixtures/compressed.log.gz +0 -0
  52. data/spec/fixtures/compressed.log.gzip +0 -0
  53. data/spec/fixtures/invalid_utf8.gbk.log +2 -0
  54. data/spec/fixtures/json.log +2 -0
  55. data/spec/fixtures/json_with_message.log +2 -0
  56. data/spec/fixtures/multiline.log +6 -0
  57. data/spec/fixtures/multiple_compressed_streams.gz +0 -0
  58. data/spec/fixtures/uncompressed.log +2 -0
  59. data/spec/inputs/cloudwatch_spec.rb +85 -0
  60. data/spec/inputs/s3_spec.rb +610 -0
  61. data/spec/inputs/sincedb_spec.rb +17 -0
  62. data/spec/inputs/sqs_spec.rb +324 -0
  63. data/spec/integration/cloudwatch_spec.rb +25 -0
  64. data/spec/integration/dynamic_prefix_spec.rb +92 -0
  65. data/spec/integration/gzip_file_spec.rb +62 -0
  66. data/spec/integration/gzip_size_rotation_spec.rb +63 -0
  67. data/spec/integration/outputs/sqs_spec.rb +98 -0
  68. data/spec/integration/restore_from_crash_spec.rb +133 -0
  69. data/spec/integration/s3_spec.rb +66 -0
  70. data/spec/integration/size_rotation_spec.rb +59 -0
  71. data/spec/integration/sqs_spec.rb +110 -0
  72. data/spec/integration/stress_test_spec.rb +60 -0
  73. data/spec/integration/time_based_rotation_with_constant_write_spec.rb +60 -0
  74. data/spec/integration/time_based_rotation_with_stale_write_spec.rb +64 -0
  75. data/spec/integration/upload_current_file_on_shutdown_spec.rb +51 -0
  76. data/spec/outputs/cloudwatch_spec.rb +38 -0
  77. data/spec/outputs/s3/file_repository_spec.rb +143 -0
  78. data/spec/outputs/s3/size_and_time_rotation_policy_spec.rb +77 -0
  79. data/spec/outputs/s3/size_rotation_policy_spec.rb +41 -0
  80. data/spec/outputs/s3/temporary_file_factory_spec.rb +89 -0
  81. data/spec/outputs/s3/temporary_file_spec.rb +47 -0
  82. data/spec/outputs/s3/time_rotation_policy_spec.rb +60 -0
  83. data/spec/outputs/s3/uploader_spec.rb +69 -0
  84. data/spec/outputs/s3/writable_directory_validator_spec.rb +40 -0
  85. data/spec/outputs/s3/write_bucket_permission_validator_spec.rb +49 -0
  86. data/spec/outputs/s3_spec.rb +232 -0
  87. data/spec/outputs/sns_spec.rb +160 -0
  88. data/spec/plugin_mixin/aws_config_spec.rb +217 -0
  89. data/spec/spec_helper.rb +8 -0
  90. data/spec/support/helpers.rb +121 -0
  91. data/spec/unit/outputs/sqs_spec.rb +247 -0
  92. data/vendor/jar-dependencies/org/logstash/plugins/integration/aws/logstash-integration-aws/7.1.1/logstash-integration-aws-7.1.1.jar +0 -0
  93. metadata +472 -0
@@ -0,0 +1,442 @@
1
+ :integration: aws
2
+ :plugin: s3
3
+ :type: output
4
+ :default_codec: line
5
+
6
+ ///////////////////////////////////////////
7
+ START - GENERATED VARIABLES, DO NOT EDIT!
8
+ ///////////////////////////////////////////
9
+ :version: %VERSION%
10
+ :release_date: %RELEASE_DATE%
11
+ :changelog_url: %CHANGELOG_URL%
12
+ :include_path: ../../../../logstash/docs/include
13
+ ///////////////////////////////////////////
14
+ END - GENERATED VARIABLES, DO NOT EDIT!
15
+ ///////////////////////////////////////////
16
+
17
+ [id="plugins-{type}s-{plugin}"]
18
+
19
+ === S3 output plugin
20
+
21
+ include::{include_path}/plugin_header-integration.asciidoc[]
22
+
23
+ ==== Description
24
+
25
+ This plugin batches and uploads logstash events into Amazon Simple Storage
26
+ Service (Amazon S3).
27
+
28
+ IMPORTANT: The S3 output plugin only supports AWS S3.
29
+ Other S3 compatible storage solutions are not supported.
30
+
31
+ S3 outputs create temporary files into the OS' temporary directory.
32
+ You can specify where to save them using the `temporary_directory` option.
33
+
34
+ IMPORTANT: For configurations containing multiple s3 outputs with the restore
35
+ option enabled, each output should define its own 'temporary_directory'.
36
+
37
+ ===== Requirements
38
+
39
+ * Amazon S3 Bucket and S3 Access Permissions (Typically access_key_id and secret_access_key)
40
+ * S3 PutObject permission
41
+
42
+ ===== S3 output file
43
+
44
+ [source,txt]
45
+ -----
46
+ `ls.s3.312bc026-2f5d-49bc-ae9f-5940cf4ad9a6.2013-04-18T10.00.tag_hello.part0.txt`
47
+ -----
48
+
49
+ |=======
50
+ | ls.s3 | indicates logstash plugin s3 |
51
+ | 312bc026-2f5d-49bc-ae9f-5940cf4ad9a6 | a new, random uuid per file. |
52
+ | 2013-04-18T10.00 | represents the time whenever you specify time_file. |
53
+ | tag_hello | indicates the event's tag. |
54
+ | part0 | If you indicate size_file, it will generate more parts if your file.size > size_file.
55
+ When a file is full, it gets pushed to the bucket and then deleted from the temporary directory.
56
+ If a file is empty, it is simply deleted. Empty files will not be pushed. |
57
+ |=======
58
+
59
+ ===== Crash Recovery
60
+
61
+ This plugin will recover and upload temporary log files after crash/abnormal termination when using `restore` set to true
62
+
63
+ ===== Usage
64
+ This is an example of logstash config:
65
+ [source,ruby]
66
+ output {
67
+ s3{
68
+ access_key_id => "crazy_key" (optional)
69
+ secret_access_key => "monkey_access_key" (optional)
70
+ region => "eu-west-1" (optional, default = "us-east-1")
71
+ bucket => "your_bucket" (required)
72
+ size_file => 2048 (optional) - Bytes
73
+ time_file => 5 (optional) - Minutes
74
+ codec => "plain" (optional)
75
+ canned_acl => "private" (optional. Options are "private", "public-read", "public-read-write", "authenticated-read", "aws-exec-read", "bucket-owner-read", "bucket-owner-full-control", "log-delivery-write". Defaults to "private" )
76
+ }
77
+
78
+
79
+ [id="plugins-{type}s-{plugin}-options"]
80
+ ==== S3 Output Configuration Options
81
+
82
+ This plugin supports the following configuration options plus the <<plugins-{type}s-{plugin}-common-options>> described later.
83
+
84
+ [cols="<,<,<",options="header",]
85
+ |=======================================================================
86
+ |Setting |Input type|Required
87
+ | <<plugins-{type}s-{plugin}-access_key_id>> |<<string,string>>|No
88
+ | <<plugins-{type}s-{plugin}-additional_settings>> |<<hash,hash>>|No
89
+ | <<plugins-{type}s-{plugin}-aws_credentials_file>> |<<string,string>>|No
90
+ | <<plugins-{type}s-{plugin}-bucket>> |<<string,string>>|Yes
91
+ | <<plugins-{type}s-{plugin}-canned_acl>> |<<string,string>>, one of `["private", "public-read", "public-read-write", "authenticated-read", "aws-exec-read", "bucket-owner-read", "bucket-owner-full-control", "log-delivery-write"]`|No
92
+ | <<plugins-{type}s-{plugin}-encoding>> |<<string,string>>, one of `["none", "gzip"]`|No
93
+ | <<plugins-{type}s-{plugin}-endpoint>> |<<string,string>>|No
94
+ | <<plugins-{type}s-{plugin}-prefix>> |<<string,string>>|No
95
+ | <<plugins-{type}s-{plugin}-proxy_uri>> |<<string,string>>|No
96
+ | <<plugins-{type}s-{plugin}-region>> |<<string,string>>|No
97
+ | <<plugins-{type}s-{plugin}-restore>> |<<boolean,boolean>>|No
98
+ | <<plugins-{type}s-{plugin}-retry_count>> |<<number,number>>|No
99
+ | <<plugins-{type}s-{plugin}-retry_delay>> |<<number,number>>|No
100
+ | <<plugins-{type}s-{plugin}-role_arn>> |<<string,string>>|No
101
+ | <<plugins-{type}s-{plugin}-role_session_name>> |<<string,string>>|No
102
+ | <<plugins-{type}s-{plugin}-rotation_strategy>> |<<string,string>>, one of `["size_and_time", "size", "time"]`|No
103
+ | <<plugins-{type}s-{plugin}-secret_access_key>> |<<string,string>>|No
104
+ | <<plugins-{type}s-{plugin}-server_side_encryption>> |<<boolean,boolean>>|No
105
+ | <<plugins-{type}s-{plugin}-server_side_encryption_algorithm>> |<<string,string>>, one of `["AES256", "aws:kms"]`|No
106
+ | <<plugins-{type}s-{plugin}-session_token>> |<<string,string>>|No
107
+ | <<plugins-{type}s-{plugin}-signature_version>> |<<string,string>>, one of `["v2", "v4"]`|No
108
+ | <<plugins-{type}s-{plugin}-size_file>> |<<number,number>>|No
109
+ | <<plugins-{type}s-{plugin}-ssekms_key_id>> |<<string,string>>|No
110
+ | <<plugins-{type}s-{plugin}-storage_class>> |<<string,string>>, one of `["STANDARD", "REDUCED_REDUNDANCY", "STANDARD_IA", "ONEZONE_IA"]`|No
111
+ | <<plugins-{type}s-{plugin}-temporary_directory>> |<<string,string>>|No
112
+ | <<plugins-{type}s-{plugin}-time_file>> |<<number,number>>|No
113
+ | <<plugins-{type}s-{plugin}-upload_multipart_threshold>> |<<number,number>>|No
114
+ | <<plugins-{type}s-{plugin}-upload_queue_size>> |<<number,number>>|No
115
+ | <<plugins-{type}s-{plugin}-upload_workers_count>> |<<number,number>>|No
116
+ | <<plugins-{type}s-{plugin}-validate_credentials_on_root_bucket>> |<<boolean,boolean>>|No
117
+ |=======================================================================
118
+
119
+ Also see <<plugins-{type}s-{plugin}-common-options>> for a list of options supported by all
120
+ output plugins.
121
+
122
+ &nbsp;
123
+
124
+ [id="plugins-{type}s-{plugin}-access_key_id"]
125
+ ===== `access_key_id`
126
+
127
+ * Value type is <<string,string>>
128
+ * There is no default value for this setting.
129
+
130
+ This plugin uses the AWS SDK and supports several ways to get credentials, which will be tried in this order:
131
+
132
+ . Static configuration, using `access_key_id` and `secret_access_key` params in logstash plugin config
133
+ . External credentials file specified by `aws_credentials_file`
134
+ . Environment variables `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`
135
+ . Environment variables `AMAZON_ACCESS_KEY_ID` and `AMAZON_SECRET_ACCESS_KEY`
136
+ . IAM Instance Profile (available when running inside EC2)
137
+
138
+ [id="plugins-{type}s-{plugin}-additional_settings"]
139
+ ===== `additional_settings`
140
+
141
+ * Value type is <<hash,hash>>
142
+ * Default value is `{}`
143
+
144
+ Key-value pairs of settings and corresponding values used to parametrize
145
+ the connection to S3. See full list in https://docs.aws.amazon.com/sdkforruby/api/Aws/S3/Client.html[the AWS SDK documentation]. Example:
146
+
147
+ [source,ruby]
148
+ output {
149
+ s3 {
150
+ access_key_id => "1234",
151
+ secret_access_key => "secret",
152
+ region => "eu-west-1",
153
+ bucket => "logstash-test",
154
+ additional_settings => {
155
+ "force_path_style" => true,
156
+ "follow_redirects" => false
157
+ }
158
+ }
159
+ }
160
+
161
+ [id="plugins-{type}s-{plugin}-aws_credentials_file"]
162
+ ===== `aws_credentials_file`
163
+
164
+ * Value type is <<string,string>>
165
+ * There is no default value for this setting.
166
+
167
+ Path to YAML file containing a hash of AWS credentials.
168
+ This file will only be loaded if `access_key_id` and
169
+ `secret_access_key` aren't set. The contents of the
170
+ file should look like this:
171
+
172
+ [source,ruby]
173
+ ----------------------------------
174
+ :access_key_id: "12345"
175
+ :secret_access_key: "54321"
176
+ ----------------------------------
177
+
178
+
179
+ [id="plugins-{type}s-{plugin}-bucket"]
180
+ ===== `bucket`
181
+
182
+ * This is a required setting.
183
+ * Value type is <<string,string>>
184
+ * There is no default value for this setting.
185
+
186
+ S3 bucket
187
+
188
+ [id="plugins-{type}s-{plugin}-canned_acl"]
189
+ ===== `canned_acl`
190
+
191
+ * Value can be any of: `private`, `public-read`, `public-read-write`, `authenticated-read`, `aws-exec-read`, `bucket-owner-read`, `bucket-owner-full-control`, `log-delivery-write`
192
+ * Default value is `"private"`
193
+
194
+ The S3 canned ACL to use when putting the file. Defaults to "private".
195
+
196
+ [id="plugins-{type}s-{plugin}-encoding"]
197
+ ===== `encoding`
198
+
199
+ * Value can be any of: `none`, `gzip`
200
+ * Default value is `"none"`
201
+
202
+ Specify the content encoding. Supports ("gzip"). Defaults to "none"
203
+
204
+ [id="plugins-{type}s-{plugin}-endpoint"]
205
+ ===== `endpoint`
206
+
207
+ * Value type is <<string,string>>
208
+ * There is no default value for this setting.
209
+
210
+ The endpoint to connect to. By default it is constructed using the value of `region`.
211
+ This is useful when connecting to S3 compatible services, but beware that these aren't
212
+ guaranteed to work correctly with the AWS SDK.
213
+ The endpoint should be an HTTP or HTTPS URL, e.g. https://example.com
214
+
215
+ [id="plugins-{type}s-{plugin}-prefix"]
216
+ ===== `prefix`
217
+
218
+ * Value type is <<string,string>>
219
+ * Default value is `""`
220
+
221
+ Specify a prefix to the uploaded filename to simulate directories on S3.
222
+ Prefix does not require leading slash.
223
+ This option supports
224
+ {logstash-ref}/event-dependent-configuration.html#sprintf[Logstash
225
+ interpolation]. For example, files can be prefixed with the event date using
226
+ `prefix = "%{+YYYY}/%{+MM}/%{+dd}"`.
227
+
228
+ IMPORTANT: Take care when you are using interpolated strings in prefixes. This
229
+ has the potential to create large numbers of unique prefixes, causing large
230
+ numbers of in-progress uploads. This scenario may result in performance and
231
+ stability issues, which can be further exacerbated when you use a
232
+ rotation_strategy that delays uploads.
233
+
234
+ [id="plugins-{type}s-{plugin}-proxy_uri"]
235
+ ===== `proxy_uri`
236
+
237
+ * Value type is <<string,string>>
238
+ * There is no default value for this setting.
239
+
240
+ URI to proxy server if required
241
+
242
+ [id="plugins-{type}s-{plugin}-region"]
243
+ ===== `region`
244
+
245
+ * Value type is <<string,string>>
246
+ * Default value is `"us-east-1"`
247
+
248
+ The AWS Region
249
+
250
+ [id="plugins-{type}s-{plugin}-restore"]
251
+ ===== `restore`
252
+
253
+ * Value type is <<boolean,boolean>>
254
+ * Default value is `true`
255
+
256
+ Used to enable recovery after crash/abnormal termination.
257
+ Temporary log files will be recovered and uploaded.
258
+
259
+ [id="plugins-{type}s-{plugin}-retry_count"]
260
+ ===== `retry_count`
261
+
262
+ * Value type is <<number,number>>
263
+ * Default value is `Infinity`
264
+
265
+ Allows to limit number of retries when S3 uploading fails.
266
+
267
+ [id="plugins-{type}s-{plugin}-retry_delay"]
268
+ ===== `retry_delay`
269
+
270
+ * Value type is <<number,number>>
271
+ * Default value is `1`
272
+
273
+ Delay (in seconds) to wait between consecutive retries on upload failures.
274
+
275
+ [id="plugins-{type}s-{plugin}-role_arn"]
276
+ ===== `role_arn`
277
+
278
+ * Value type is <<string,string>>
279
+ * There is no default value for this setting.
280
+
281
+ The AWS IAM Role to assume, if any.
282
+ This is used to generate temporary credentials, typically for cross-account access.
283
+ See the https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html[AssumeRole API documentation] for more information.
284
+
285
+ [id="plugins-{type}s-{plugin}-role_session_name"]
286
+ ===== `role_session_name`
287
+
288
+ * Value type is <<string,string>>
289
+ * Default value is `"logstash"`
290
+
291
+ Session name to use when assuming an IAM role.
292
+
293
+ [id="plugins-{type}s-{plugin}-rotation_strategy"]
294
+ ===== `rotation_strategy`
295
+
296
+ * Value can be any of: `size_and_time`, `size`, `time`
297
+ * Default value is `"size_and_time"`
298
+
299
+ Controls when to close the file and push it to S3.
300
+
301
+ If you set this value to `size`, it uses the value set in
302
+ <<plugins-{type}s-{plugin}-size_file,`size_file`>>.
303
+ If you set this value to `time`, it uses the value set in
304
+ <<plugins-{type}s-{plugin}-time_file,`time_file`>>.
305
+ If you set this value to `size_and_time`, it uses the values from
306
+ <<plugins-{type}s-{plugin}-size_file,`size_file`>> and
307
+ <<plugins-{type}s-{plugin}-time_file,`time_file`>>, and splits the file when
308
+ either one matches.
309
+
310
+ The default strategy checks both size and time. The first value to
311
+ match triggers file rotation.
312
+
313
+ [id="plugins-{type}s-{plugin}-secret_access_key"]
314
+ ===== `secret_access_key`
315
+
316
+ * Value type is <<string,string>>
317
+ * There is no default value for this setting.
318
+
319
+ The AWS Secret Access Key
320
+
321
+ [id="plugins-{type}s-{plugin}-server_side_encryption"]
322
+ ===== `server_side_encryption`
323
+
324
+ * Value type is <<boolean,boolean>>
325
+ * Default value is `false`
326
+
327
+ Specifies whether or not to use S3's server side encryption. Defaults to no encryption.
328
+
329
+ [id="plugins-{type}s-{plugin}-server_side_encryption_algorithm"]
330
+ ===== `server_side_encryption_algorithm`
331
+
332
+ * Value can be any of: `AES256`, `aws:kms`
333
+ * Default value is `"AES256"`
334
+
335
+ Specifies what type of encryption to use when SSE is enabled.
336
+
337
+ [id="plugins-{type}s-{plugin}-session_token"]
338
+ ===== `session_token`
339
+
340
+ * Value type is <<string,string>>
341
+ * There is no default value for this setting.
342
+
343
+ The AWS Session token for temporary credential
344
+
345
+ [id="plugins-{type}s-{plugin}-signature_version"]
346
+ ===== `signature_version`
347
+
348
+ * Value can be any of: `v2`, `v4`
349
+ * There is no default value for this setting.
350
+
351
+ The version of the S3 signature hash to use. Normally uses the internal client default, can be explicitly
352
+ specified here
353
+
354
+ [id="plugins-{type}s-{plugin}-size_file"]
355
+ ===== `size_file`
356
+
357
+ * Value type is <<number,number>>
358
+ * Default value is `5242880`
359
+
360
+ Set the file size in bytes. When the number of bytes exceeds the `size_file`
361
+ value, a new file is created. If you use tags, Logstash generates a specific size
362
+ file for every tag.
363
+
364
+ [id="plugins-{type}s-{plugin}-ssekms_key_id"]
365
+ ===== `ssekms_key_id`
366
+
367
+ * Value type is <<string,string>>
368
+ * There is no default value for this setting.
369
+
370
+ The key to use when specified along with server_side_encryption => aws:kms.
371
+ If server_side_encryption => aws:kms is set but this is not default KMS key is used.
372
+ http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html
373
+
374
+ [id="plugins-{type}s-{plugin}-storage_class"]
375
+ ===== `storage_class`
376
+
377
+ * Value can be any of: `STANDARD`, `REDUCED_REDUNDANCY`, `STANDARD_IA`, `ONEZONE_IA`
378
+ * Default value is `"STANDARD"`
379
+
380
+ Specifies what S3 storage class to use when uploading the file.
381
+ More information about the different storage classes can be found:
382
+ http://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
383
+ Defaults to STANDARD.
384
+
385
+ [id="plugins-{type}s-{plugin}-temporary_directory"]
386
+ ===== `temporary_directory`
387
+
388
+ * Value type is <<string,string>>
389
+ * Default value is `"/tmp/logstash"`
390
+
391
+ Set the directory where logstash will store the tmp files before sending it to S3
392
+ default to the current OS temporary directory in linux /tmp/logstash
393
+
394
+ [id="plugins-{type}s-{plugin}-time_file"]
395
+ ===== `time_file`
396
+
397
+ * Value type is <<number,number>>
398
+ * Default value is `15`
399
+
400
+ Set the time, in MINUTES, to close the current sub_time_section of bucket.
401
+ If <<plugins-{type}s-{plugin}-rotation_strategy,`rotation_strategy`>> is set to `time` or `size_and_time`, then `time_file` cannot be set to 0.
402
+ Otherwise, the plugin raises a configuration error.
403
+
404
+ [id="plugins-{type}s-{plugin}-upload_multipart_threshold"]
405
+ ===== `upload_multipart_threshold`
406
+
407
+ * Value type is <<number,number>>
408
+ * Default value is `15728640`
409
+
410
+ Files larger than this number are uploaded using the S3 multipart APIs
411
+
412
+ [id="plugins-{type}s-{plugin}-upload_queue_size"]
413
+ ===== `upload_queue_size`
414
+
415
+ * Value type is <<number,number>>
416
+ * Default value is `4`
417
+
418
+ Number of items we can keep in the local queue before uploading them
419
+
420
+ [id="plugins-{type}s-{plugin}-upload_workers_count"]
421
+ ===== `upload_workers_count`
422
+
423
+ * Value type is <<number,number>>
424
+ * Default value is `4`
425
+
426
+ Specify how many workers to use to upload the files to S3
427
+
428
+ [id="plugins-{type}s-{plugin}-validate_credentials_on_root_bucket"]
429
+ ===== `validate_credentials_on_root_bucket`
430
+
431
+ * Value type is <<boolean,boolean>>
432
+ * Default value is `true`
433
+
434
+ The common use case is to define permissions on the root bucket and give Logstash
435
+ full access to write logs.
436
+ In some circumstances, you need more granular permissions on the subfolder. This
437
+ allows you to disable the check at startup.
438
+
439
+ [id="plugins-{type}s-{plugin}-common-options"]
440
+ include::{include_path}/{type}.asciidoc[]
441
+
442
+ :default_codec!:
@@ -0,0 +1,166 @@
1
+ :integration: aws
2
+ :plugin: sns
3
+ :type: output
4
+ :default_codec: plain
5
+
6
+ ///////////////////////////////////////////
7
+ START - GENERATED VARIABLES, DO NOT EDIT!
8
+ ///////////////////////////////////////////
9
+ :version: %VERSION%
10
+ :release_date: %RELEASE_DATE%
11
+ :changelog_url: %CHANGELOG_URL%
12
+ :include_path: ../../../../logstash/docs/include
13
+ ///////////////////////////////////////////
14
+ END - GENERATED VARIABLES, DO NOT EDIT!
15
+ ///////////////////////////////////////////
16
+
17
+ [id="plugins-{type}s-{plugin}"]
18
+
19
+ === Sns output plugin
20
+
21
+ include::{include_path}/plugin_header-integration.asciidoc[]
22
+
23
+ ==== Description
24
+
25
+ SNS output.
26
+
27
+ Send events to Amazon's Simple Notification Service, a hosted pub/sub
28
+ framework. It supports various subscription types, including email, HTTP/S, SMS, and SQS.
29
+
30
+ For further documentation about the service see:
31
+
32
+ http://docs.amazonwebservices.com/sns/latest/api/
33
+
34
+ This plugin looks for the following fields on events it receives:
35
+
36
+ * `sns` - If no ARN is found in the configuration file, this will be used as
37
+ the ARN to publish.
38
+ * `sns_subject` - The subject line that should be used.
39
+ Optional. The "%{host}" will be used if `sns_subject` is not present. The subject
40
+ will be truncated to 100 characters. If `sns_subject` is set to a non-string value a JSON version of that value will be saved.
41
+ * `sns_message` - Optional string of message to be sent. If this is set to a non-string value it will be encoded with the specified `codec`. If this is not set the entire event will be encoded with the codec.
42
+ with the @message truncated so that the length of the JSON fits in
43
+ `32768` bytes.
44
+
45
+ ==== Upgrading to 2.0.0
46
+
47
+ This plugin used to have a `format` option for controlling the encoding of messages prior to being sent to SNS.
48
+ This plugin now uses the logstash standard {logstash-ref}/configuration-file-structure.html#codec[codec] option for encoding instead.
49
+ If you want the same 'plain' format as the v0/1 codec (`format => "plain"`) use `codec => "s3_plain"`.
50
+
51
+
52
+ [id="plugins-{type}s-{plugin}-options"]
53
+ ==== Sns Output Configuration Options
54
+
55
+ This plugin supports the following configuration options plus the <<plugins-{type}s-{plugin}-common-options>> described later.
56
+
57
+ [cols="<,<,<",options="header",]
58
+ |=======================================================================
59
+ |Setting |Input type|Required
60
+ | <<plugins-{type}s-{plugin}-access_key_id>> |<<string,string>>|No
61
+ | <<plugins-{type}s-{plugin}-arn>> |<<string,string>>|No
62
+ | <<plugins-{type}s-{plugin}-aws_credentials_file>> |<<string,string>>|No
63
+ | <<plugins-{type}s-{plugin}-proxy_uri>> |<<string,string>>|No
64
+ | <<plugins-{type}s-{plugin}-publish_boot_message_arn>> |<<string,string>>|No
65
+ | <<plugins-{type}s-{plugin}-region>> |<<string,string>>, one of `["us-east-1", "us-east-2", "us-west-1", "us-west-2", "eu-central-1", "eu-west-1", "eu-west-2", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ap-northeast-2", "sa-east-1", "us-gov-west-1", "cn-north-1", "ap-south-1", "ca-central-1"]`|No
66
+ | <<plugins-{type}s-{plugin}-secret_access_key>> |<<string,string>>|No
67
+ | <<plugins-{type}s-{plugin}-session_token>> |<<string,string>>|No
68
+ |=======================================================================
69
+
70
+ Also see <<plugins-{type}s-{plugin}-common-options>> for a list of options supported by all
71
+ output plugins.
72
+
73
+ &nbsp;
74
+
75
+ [id="plugins-{type}s-{plugin}-access_key_id"]
76
+ ===== `access_key_id`
77
+
78
+ * Value type is <<string,string>>
79
+ * There is no default value for this setting.
80
+
81
+ This plugin uses the AWS SDK and supports several ways to get credentials, which will be tried in this order:
82
+
83
+ 1. Static configuration, using `access_key_id` and `secret_access_key` params in logstash plugin config
84
+ 2. External credentials file specified by `aws_credentials_file`
85
+ 3. Environment variables `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`
86
+ 4. Environment variables `AMAZON_ACCESS_KEY_ID` and `AMAZON_SECRET_ACCESS_KEY`
87
+ 5. IAM Instance Profile (available when running inside EC2)
88
+
89
+ [id="plugins-{type}s-{plugin}-arn"]
90
+ ===== `arn`
91
+
92
+ * Value type is <<string,string>>
93
+ * There is no default value for this setting.
94
+
95
+ Optional ARN to send messages to. If you do not set this you must
96
+ include the `sns` field in your events to set the ARN on a per-message basis!
97
+
98
+ [id="plugins-{type}s-{plugin}-aws_credentials_file"]
99
+ ===== `aws_credentials_file`
100
+
101
+ * Value type is <<string,string>>
102
+ * There is no default value for this setting.
103
+
104
+ Path to YAML file containing a hash of AWS credentials.
105
+ This file will only be loaded if `access_key_id` and
106
+ `secret_access_key` aren't set. The contents of the
107
+ file should look like this:
108
+
109
+ [source,ruby]
110
+ ----------------------------------
111
+ :access_key_id: "12345"
112
+ :secret_access_key: "54321"
113
+ ----------------------------------
114
+
115
+
116
+ [id="plugins-{type}s-{plugin}-proxy_uri"]
117
+ ===== `proxy_uri`
118
+
119
+ * Value type is <<string,string>>
120
+ * There is no default value for this setting.
121
+
122
+ URI to proxy server if required
123
+
124
+ [id="plugins-{type}s-{plugin}-publish_boot_message_arn"]
125
+ ===== `publish_boot_message_arn`
126
+
127
+ * Value type is <<string,string>>
128
+ * There is no default value for this setting.
129
+
130
+ When an ARN for an SNS topic is specified here, the message
131
+ "Logstash successfully booted" will be sent to it when this plugin
132
+ is registered.
133
+
134
+ Example: arn:aws:sns:us-east-1:770975001275:logstash-testing
135
+
136
+
137
+ [id="plugins-{type}s-{plugin}-region"]
138
+ ===== `region`
139
+
140
+ * Value can be any of: `us-east-1`, `us-east-2`, `us-west-1`, `us-west-2`, `eu-central-1`, `eu-west-1`, `eu-west-2`, `ap-southeast-1`, `ap-southeast-2`, `ap-northeast-1`, `ap-northeast-2`, `sa-east-1`, `us-gov-west-1`, `cn-north-1`, `ap-south-1`, `ca-central-1`
141
+ * Default value is `"us-east-1"`
142
+
143
+ The AWS Region
144
+
145
+ [id="plugins-{type}s-{plugin}-secret_access_key"]
146
+ ===== `secret_access_key`
147
+
148
+ * Value type is <<string,string>>
149
+ * There is no default value for this setting.
150
+
151
+ The AWS Secret Access Key
152
+
153
+ [id="plugins-{type}s-{plugin}-session_token"]
154
+ ===== `session_token`
155
+
156
+ * Value type is <<string,string>>
157
+ * There is no default value for this setting.
158
+
159
+ The AWS Session token for temporary credential
160
+
161
+
162
+
163
+ [id="plugins-{type}s-{plugin}-common-options"]
164
+ include::{include_path}/{type}.asciidoc[]
165
+
166
+ :default_codec!: