logstash-output-s3 4.0.7 → 4.0.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4101484ab3c3ed89b22088de339be1cf010b3753
4
- data.tar.gz: 4f31784de1daf62a7673a3e756bff48876c3874f
3
+ metadata.gz: 0c5e0dea828a0337ddbc6f6a16c066d96957d1e9
4
+ data.tar.gz: 48349191b34fee81b5e5270bdfaa859679e0f6dc
5
5
  SHA512:
6
- metadata.gz: fd14b0db9ce158b3c0d7a00182f7aa6adf7eb5d5c178d958d6103204864fd1dc914929a2f214e67b1b4f0c931abef23f57fde968f423fb4ce62f31f52d79952a
7
- data.tar.gz: f56cd39938dbf9191e8d4190b5e38fa60072a8ffb2e876776bcd82a7b84436d349d7056ee81372247ccdc7a88cc5b0635e2f81251c1d560f81777b52a66ca527
6
+ metadata.gz: ed282270f16481347356ee28d24905cc464dbcd5854370a351f95744d3eb6520e67079a28aaa6f736f2a23a1f1be3b015d6233101bf99fee7c34ed17f821d8df
7
+ data.tar.gz: 556d6cbe0469cd0c1ca7de0ee2c6e536a15aa841444774dc9a172647f10881c6bde9c1f1b9fd67719aa09c38f65fda59cff98c7239d9f584ca28109808a4beb8
data/Gemfile CHANGED
@@ -1,4 +1,11 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- # Specify your gem's dependencies in logstash-mass_effect.gemspec
4
3
  gemspec
4
+
5
+ logstash_path = ENV["LOGSTASH_PATH"] || "../../logstash"
6
+ use_logstash_source = ENV["LOGSTASH_SOURCE"] && ENV["LOGSTASH_SOURCE"].to_s == "1"
7
+
8
+ if Dir.exist?(logstash_path) && use_logstash_source
9
+ gem 'logstash-core', :path => "#{logstash_path}/logstash-core"
10
+ gem 'logstash-core-plugin-api', :path => "#{logstash_path}/logstash-core-plugin-api"
11
+ end
@@ -0,0 +1,327 @@
1
+ :plugin: s3
2
+ :type: output
3
+
4
+ ///////////////////////////////////////////
5
+ START - GENERATED VARIABLES, DO NOT EDIT!
6
+ ///////////////////////////////////////////
7
+ :version: %VERSION%
8
+ :release_date: %RELEASE_DATE%
9
+ :changelog_url: %CHANGELOG_URL%
10
+ :include_path: ../../../../logstash/docs/include
11
+ ///////////////////////////////////////////
12
+ END - GENERATED VARIABLES, DO NOT EDIT!
13
+ ///////////////////////////////////////////
14
+
15
+ [id="plugins-{type}-{plugin}"]
16
+
17
+ === S3 output plugin
18
+
19
+ include::{include_path}/plugin_header.asciidoc[]
20
+
21
+ ==== Description
22
+
23
+ INFORMATION:
24
+
25
+ This plugin batches and uploads logstash events into Amazon Simple Storage Service (Amazon S3).
26
+
27
+ Requirements:
28
+ * Amazon S3 Bucket and S3 Access Permissions (Typically access_key_id and secret_access_key)
29
+ * S3 PutObject permission
30
+
31
+ S3 outputs create temporary files into the OS' temporary directory, you can specify where to save them using the `temporary_directory` option.
32
+
33
+ S3 output files have the following format
34
+
35
+ ls.s3.312bc026-2f5d-49bc-ae9f-5940cf4ad9a6.2013-04-18T10.00.tag_hello.part0.txt
36
+
37
+
38
+ |=======
39
+ | ls.s3 | indicate logstash plugin s3 |
40
+ | 312bc026-2f5d-49bc-ae9f-5940cf4ad9a6 | a new, random uuid per file. |
41
+ | 2013-04-18T10.00 | represents the time whenever you specify time_file. |
42
+ | tag_hello | this indicates the event's tag. |
43
+ | part0 | this means if you indicate size_file then it will generate more parts if you file.size > size_file. When a file is full it will be pushed to the bucket and then deleted from the temporary directory. If a file is empty, it is simply deleted. Empty files will not be pushed |
44
+ |=======
45
+
46
+ Crash Recovery:
47
+ * This plugin will recover and upload temporary log files after crash/abnormal termination when using `restore` set to true
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+ #### Usage:
56
+ This is an example of logstash config:
57
+ [source,ruby]
58
+ output {
59
+ s3{
60
+ access_key_id => "crazy_key" (required)
61
+ secret_access_key => "monkey_access_key" (required)
62
+ region => "eu-west-1" (optional, default = "us-east-1")
63
+ bucket => "your_bucket" (required)
64
+ size_file => 2048 (optional) - Bytes
65
+ time_file => 5 (optional) - Minutes
66
+ codec => "plain" (optional)
67
+ canned_acl => "private" (optional. Options are "private", "public-read", "public-read-write", "authenticated-read". Defaults to "private" )
68
+ }
69
+
70
+
71
+ [id="plugins-{type}s-{plugin}-options"]
72
+ ==== S3 Output Configuration Options
73
+
74
+ This plugin supports the following configuration options plus the <<plugins-{type}s-{plugin}-common-options>> described later.
75
+
76
+ [cols="<,<,<",options="header",]
77
+ |=======================================================================
78
+ |Setting |Input type|Required
79
+ | <<plugins-{type}s-{plugin}-access_key_id>> |<<string,string>>|No
80
+ | <<plugins-{type}s-{plugin}-aws_credentials_file>> |<<string,string>>|No
81
+ | <<plugins-{type}s-{plugin}-bucket>> |<<string,string>>|Yes
82
+ | <<plugins-{type}s-{plugin}-canned_acl>> |<<string,string>>, one of `["private", "public-read", "public-read-write", "authenticated-read"]`|No
83
+ | <<plugins-{type}s-{plugin}-encoding>> |<<string,string>>, one of `["none", "gzip"]`|No
84
+ | <<plugins-{type}s-{plugin}-prefix>> |<<string,string>>|No
85
+ | <<plugins-{type}s-{plugin}-proxy_uri>> |<<string,string>>|No
86
+ | <<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
87
+ | <<plugins-{type}s-{plugin}-restore>> |<<boolean,boolean>>|No
88
+ | <<plugins-{type}s-{plugin}-rotation_strategy>> |<<string,string>>, one of `["size_and_time", "size", "time"]`|No
89
+ | <<plugins-{type}s-{plugin}-secret_access_key>> |<<string,string>>|No
90
+ | <<plugins-{type}s-{plugin}-server_side_encryption>> |<<boolean,boolean>>|No
91
+ | <<plugins-{type}s-{plugin}-server_side_encryption_algorithm>> |<<string,string>>, one of `["AES256", "aws:kms"]`|No
92
+ | <<plugins-{type}s-{plugin}-session_token>> |<<string,string>>|No
93
+ | <<plugins-{type}s-{plugin}-signature_version>> |<<string,string>>, one of `["v2", "v4"]`|No
94
+ | <<plugins-{type}s-{plugin}-size_file>> |<<number,number>>|No
95
+ | <<plugins-{type}s-{plugin}-ssekms_key_id>> |<<string,string>>|No
96
+ | <<plugins-{type}s-{plugin}-storage_class>> |<<string,string>>, one of `["STANDARD", "REDUCED_REDUNDANCY", "STANDARD_IA"]`|No
97
+ | <<plugins-{type}s-{plugin}-temporary_directory>> |<<string,string>>|No
98
+ | <<plugins-{type}s-{plugin}-time_file>> |<<number,number>>|No
99
+ | <<plugins-{type}s-{plugin}-upload_queue_size>> |<<number,number>>|No
100
+ | <<plugins-{type}s-{plugin}-upload_workers_count>> |<<number,number>>|No
101
+ | <<plugins-{type}s-{plugin}-validate_credentials_on_root_bucket>> |<<boolean,boolean>>|No
102
+ |=======================================================================
103
+
104
+ Also see <<plugins-{type}s-{plugin}-common-options>> for a list of options supported by all
105
+ output plugins.
106
+
107
+ &nbsp;
108
+
109
+ [id="plugins-{type}s-{plugin}-access_key_id"]
110
+ ===== `access_key_id`
111
+
112
+ * Value type is <<string,string>>
113
+ * There is no default value for this setting.
114
+
115
+ This plugin uses the AWS SDK and supports several ways to get credentials, which will be tried in this order:
116
+
117
+ 1. Static configuration, using `access_key_id` and `secret_access_key` params in logstash plugin config
118
+ 2. External credentials file specified by `aws_credentials_file`
119
+ 3. Environment variables `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`
120
+ 4. Environment variables `AMAZON_ACCESS_KEY_ID` and `AMAZON_SECRET_ACCESS_KEY`
121
+ 5. IAM Instance Profile (available when running inside EC2)
122
+
123
+ [id="plugins-{type}s-{plugin}-aws_credentials_file"]
124
+ ===== `aws_credentials_file`
125
+
126
+ * Value type is <<string,string>>
127
+ * There is no default value for this setting.
128
+
129
+ Path to YAML file containing a hash of AWS credentials.
130
+ This file will only be loaded if `access_key_id` and
131
+ `secret_access_key` aren't set. The contents of the
132
+ file should look like this:
133
+
134
+ [source,ruby]
135
+ ----------------------------------
136
+ :access_key_id: "12345"
137
+ :secret_access_key: "54321"
138
+ ----------------------------------
139
+
140
+
141
+ [id="plugins-{type}s-{plugin}-bucket"]
142
+ ===== `bucket`
143
+
144
+ * This is a required setting.
145
+ * Value type is <<string,string>>
146
+ * There is no default value for this setting.
147
+
148
+ S3 bucket
149
+
150
+ [id="plugins-{type}s-{plugin}-canned_acl"]
151
+ ===== `canned_acl`
152
+
153
+ * Value can be any of: `private`, `public-read`, `public-read-write`, `authenticated-read`
154
+ * Default value is `"private"`
155
+
156
+ The S3 canned ACL to use when putting the file. Defaults to "private".
157
+
158
+ [id="plugins-{type}s-{plugin}-encoding"]
159
+ ===== `encoding`
160
+
161
+ * Value can be any of: `none`, `gzip`
162
+ * Default value is `"none"`
163
+
164
+ Specify the content encoding. Supports ("gzip"). Defaults to "none"
165
+
166
+ [id="plugins-{type}s-{plugin}-prefix"]
167
+ ===== `prefix`
168
+
169
+ * Value type is <<string,string>>
170
+ * Default value is `""`
171
+
172
+ Specify a prefix to the uploaded filename, this can simulate directories on S3. Prefix does not require leading slash.
173
+ This option support string interpolation, be warned this can created a lot of temporary local files.
174
+
175
+ [id="plugins-{type}s-{plugin}-proxy_uri"]
176
+ ===== `proxy_uri`
177
+
178
+ * Value type is <<string,string>>
179
+ * There is no default value for this setting.
180
+
181
+ URI to proxy server if required
182
+
183
+ [id="plugins-{type}s-{plugin}-region"]
184
+ ===== `region`
185
+
186
+ * 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`
187
+ * Default value is `"us-east-1"`
188
+
189
+ The AWS Region
190
+
191
+ [id="plugins-{type}s-{plugin}-restore"]
192
+ ===== `restore`
193
+
194
+ * Value type is <<boolean,boolean>>
195
+ * Default value is `true`
196
+
197
+
198
+
199
+ [id="plugins-{type}s-{plugin}-rotation_strategy"]
200
+ ===== `rotation_strategy`
201
+
202
+ * Value can be any of: `size_and_time`, `size`, `time`
203
+ * Default value is `"size_and_time"`
204
+
205
+ Define the strategy to use to decide when we need to rotate the file and push it to S3,
206
+ The default strategy is to check for both size and time, the first one to match will rotate the file.
207
+
208
+ [id="plugins-{type}s-{plugin}-secret_access_key"]
209
+ ===== `secret_access_key`
210
+
211
+ * Value type is <<string,string>>
212
+ * There is no default value for this setting.
213
+
214
+ The AWS Secret Access Key
215
+
216
+ [id="plugins-{type}s-{plugin}-server_side_encryption"]
217
+ ===== `server_side_encryption`
218
+
219
+ * Value type is <<boolean,boolean>>
220
+ * Default value is `false`
221
+
222
+ Specifies wether or not to use S3's server side encryption. Defaults to no encryption.
223
+
224
+ [id="plugins-{type}s-{plugin}-server_side_encryption_algorithm"]
225
+ ===== `server_side_encryption_algorithm`
226
+
227
+ * Value can be any of: `AES256`, `aws:kms`
228
+ * Default value is `"AES256"`
229
+
230
+ Specifies what type of encryption to use when SSE is enabled.
231
+
232
+ [id="plugins-{type}s-{plugin}-session_token"]
233
+ ===== `session_token`
234
+
235
+ * Value type is <<string,string>>
236
+ * There is no default value for this setting.
237
+
238
+ The AWS Session token for temporary credential
239
+
240
+ [id="plugins-{type}s-{plugin}-signature_version"]
241
+ ===== `signature_version`
242
+
243
+ * Value can be any of: `v2`, `v4`
244
+ * There is no default value for this setting.
245
+
246
+ The version of the S3 signature hash to use. Normally uses the internal client default, can be explicitly
247
+ specified here
248
+
249
+ [id="plugins-{type}s-{plugin}-size_file"]
250
+ ===== `size_file`
251
+
252
+ * Value type is <<number,number>>
253
+ * Default value is `5242880`
254
+
255
+ Set the size of file in bytes, this means that files on bucket when have dimension > file_size, they are stored in two or more file.
256
+ If you have tags then it will generate a specific size file for every tags
257
+
258
+ [id="plugins-{type}s-{plugin}-ssekms_key_id"]
259
+ ===== `ssekms_key_id`
260
+
261
+ * Value type is <<string,string>>
262
+ * There is no default value for this setting.
263
+
264
+ The key to use when specified along with server_side_encryption => aws:kms.
265
+ If server_side_encryption => aws:kms is set but this is not default KMS key is used.
266
+ http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html
267
+
268
+ [id="plugins-{type}s-{plugin}-storage_class"]
269
+ ===== `storage_class`
270
+
271
+ * Value can be any of: `STANDARD`, `REDUCED_REDUNDANCY`, `STANDARD_IA`
272
+ * Default value is `"STANDARD"`
273
+
274
+ Specifies what S3 storage class to use when uploading the file.
275
+ More information about the different storage classes can be found:
276
+ http://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
277
+ Defaults to STANDARD.
278
+
279
+ [id="plugins-{type}s-{plugin}-temporary_directory"]
280
+ ===== `temporary_directory`
281
+
282
+ * Value type is <<string,string>>
283
+ * Default value is `"/tmp/logstash"`
284
+
285
+ Set the directory where logstash will store the tmp files before sending it to S3
286
+ default to the current OS temporary directory in linux /tmp/logstash
287
+
288
+ [id="plugins-{type}s-{plugin}-time_file"]
289
+ ===== `time_file`
290
+
291
+ * Value type is <<number,number>>
292
+ * Default value is `15`
293
+
294
+ Set the time, in MINUTES, to close the current sub_time_section of bucket.
295
+ If you define file_size you have a number of files in consideration of the section and the current tag.
296
+ 0 stay all time on listerner, beware if you specific 0 and size_file 0, because you will not put the file on bucket,
297
+ for now the only thing this plugin can do is to put the file when logstash restart.
298
+
299
+ [id="plugins-{type}s-{plugin}-upload_queue_size"]
300
+ ===== `upload_queue_size`
301
+
302
+ * Value type is <<number,number>>
303
+ * Default value is `4`
304
+
305
+ Number of items we can keep in the local queue before uploading them
306
+
307
+ [id="plugins-{type}s-{plugin}-upload_workers_count"]
308
+ ===== `upload_workers_count`
309
+
310
+ * Value type is <<number,number>>
311
+ * Default value is `4`
312
+
313
+ Specify how many workers to use to upload the files to S3
314
+
315
+ [id="plugins-{type}s-{plugin}-validate_credentials_on_root_bucket"]
316
+ ===== `validate_credentials_on_root_bucket`
317
+
318
+ * Value type is <<boolean,boolean>>
319
+ * Default value is `true`
320
+
321
+ The common use case is to define permission on the root bucket and give Logstash full access to write its logs.
322
+ In some circonstances you need finer grained permission on subfolder, this allow you to disable the check at startup.
323
+
324
+
325
+
326
+ [id="plugins-{type}s-{plugin}-common-options"]
327
+ include::{include_path}/{type}.asciidoc[]
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-output-s3'
3
- s.version = '4.0.7'
3
+ s.version = '4.0.8'
4
4
  s.licenses = ['Apache-2.0']
5
5
  s.summary = "This plugin was created for store the logstash's events into Amazon Simple Storage Service (Amazon S3)"
6
6
  s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.require_paths = ["lib"]
11
11
 
12
12
  # Files
13
- s.files = Dir['lib/**/*','spec/**/*','vendor/**/*','*.gemspec','*.md','CONTRIBUTORS','Gemfile','LICENSE','NOTICE.TXT']
13
+ s.files = Dir["lib/**/*","spec/**/*","*.gemspec","*.md","CONTRIBUTORS","Gemfile","LICENSE","NOTICE.TXT", "vendor/jar-dependencies/**/*.jar", "vendor/jar-dependencies/**/*.rb", "VERSION", "docs/**/*"]
14
14
 
15
15
  # Tests
16
16
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-s3
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.7
4
+ version: 4.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-28 00:00:00.000000000 Z
11
+ date: 2017-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -127,6 +127,7 @@ files:
127
127
  - LICENSE
128
128
  - NOTICE.TXT
129
129
  - README.md
130
+ - docs/index.asciidoc
130
131
  - lib/logstash/outputs/s3.rb
131
132
  - lib/logstash/outputs/s3/file_repository.rb
132
133
  - lib/logstash/outputs/s3/patch.rb