logstash-output-s3 1.0.2 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3be2b43f76501d55123677b71390bb07abceba04
4
- data.tar.gz: 761bac43dc3b59c4ab7669354082707227e7e0bb
3
+ metadata.gz: 8b5f165ffc5c6daa7d2f89be49daf78ff5d86172
4
+ data.tar.gz: 22abfdb19ac948cdc57f6f844e2829db8dcf80be
5
5
  SHA512:
6
- metadata.gz: 5b7ec1c574e3312f59df5818984a09c772ed4805ca5dad4d96db37907b1cdbf41934f32376f90ff8cab6c071ccba119abe1b38018bcfdace21ab7222c011d41e
7
- data.tar.gz: 71229a4d5fcf7fb5ea7599c49ef5740b00676416da4efd6d72c1d8310c1d96cc409a08110a4e5c2df88a0f857144957ed99720bb714804a5b620690bc97f5998
6
+ metadata.gz: 00219d3daeb9050698e0918f214e3dd6b7dc3f4b821d081b846db6e85e0ee844d2da8731584a8d00db8a9d98f3ca1207be12912e522e7efb9a7412014946357d
7
+ data.tar.gz: 968129c147b8645b50c56cf42a76a653ffc904b361a97ecb6335fd6da1d459c43669ab79601f4c35bb7ade7c419cba6b887b41d8186e04299b132f45486a2778
data/CHANGELOG.md CHANGED
@@ -1,6 +1,3 @@
1
- # 1.0.2
2
- - Explicitly require `stud/task` to make the test pass on when running them inside logstash 1.5.X fixes #36
3
-
4
1
  # 1.0.1
5
2
  - Fix a synchronization issue when doing file rotation and checking the size of the current file
6
3
  - Fix an issue with synchronization when shutting down the plugin and closing the current temp file
data/Gemfile CHANGED
@@ -1,3 +1,2 @@
1
1
  source 'https://rubygems.org'
2
2
  gemspec
3
- gem "logstash-core", "1.5.4"
@@ -12,25 +12,24 @@ require "fileutils"
12
12
 
13
13
  # INFORMATION:
14
14
  #
15
- # This plugin was created for store the logstash's events into Amazon Simple Storage Service (Amazon S3).
16
- # For use it you needs authentications and an s3 bucket.
17
- # Be careful to have the permission to write file on S3's bucket and run logstash with super user for establish connection.
15
+ # This plugin sends logstash events to Amazon Simple Storage Service (Amazon S3).
16
+ # To use it you need to have the proper write premissions and a valid s3 bucket.
17
+ # Make sure you have permissions to write files on S3's bucket. Also be sure to run logstash as super user to establish a connection.
18
18
  #
19
- # S3 plugin allows you to do something complex, let's explain:)
20
19
  #
21
- # S3 outputs create temporary files into "/opt/logstash/S3_temp/". If you want, you can change the path at the start of register method.
22
- # This files have a special name, for example:
20
+ # This plugin outputs temporary files to "/opt/logstash/S3_temp/". If you want, you can change the path at the start of register method.
21
+ # These files have a special name, for example:
23
22
  #
24
23
  # ls.s3.ip-10-228-27-95.2013-04-18T10.00.tag_hello.part0.txt
25
24
  #
26
25
  # ls.s3 : indicate logstash plugin s3
27
26
  #
28
- # "ip-10-228-27-95" : indicate you ip machine, if you have more logstash and writing on the same bucket for example.
27
+ # "ip-10-228-27-95" : indicates the ip of your machine.
29
28
  # "2013-04-18T10.00" : represents the time whenever you specify time_file.
30
- # "tag_hello" : this indicate the event's tag, you can collect events with the same tag.
29
+ # "tag_hello" : this indicates the event's tag.
31
30
  # "part0" : this means if you indicate size_file then it will generate more parts if you file.size > size_file.
32
- # When a file is full it will pushed on bucket and will be deleted in temporary directory.
33
- # If a file is empty is not pushed, but deleted.
31
+ # When a file is full it will be pushed to a bucket and will be deleted from the temporary directory.
32
+ # If a file is empty is not pushed, it is not deleted.
34
33
  #
35
34
  # This plugin have a system to restore the previous temporary files if something crash.
36
35
  #
@@ -305,19 +304,18 @@ class LogStash::Outputs::S3 < LogStash::Outputs::Base
305
304
  end
306
305
  rescue Errno::ENOSPC
307
306
  @logger.error("S3: No space left in temporary directory", :temporary_directory => @temporary_directory)
308
- teardown
307
+ close
309
308
  end
310
309
  end
311
310
 
312
311
  public
313
- def teardown
312
+ def close
314
313
  shutdown_upload_workers
315
314
  @periodic_rotation_thread.stop! if @periodic_rotation_thread
316
315
 
317
316
  @file_rotation_lock.synchronize do
318
317
  @tempfile.close unless @tempfile.nil? && @tempfile.closed?
319
318
  end
320
- finished
321
319
  end
322
320
 
323
321
  private
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-output-s3'
4
- s.version = '1.0.2'
4
+ s.version = '2.0.0'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "This plugin was created for store the logstash's events into Amazon Simple Storage Service (Amazon S3)"
7
7
  s.description = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program"
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
11
11
  s.require_paths = ["lib"]
12
12
 
13
13
  # Files
14
- s.files = `git ls-files`.split($\)+::Dir.glob('vendor/*')
14
+ s.files = Dir['lib/**/*','spec/**/*','vendor/**/*','*.gemspec','*.md','CONTRIBUTORS','Gemfile','LICENSE','NOTICE.TXT']
15
15
 
16
16
  # Tests
17
17
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
@@ -20,12 +20,11 @@ Gem::Specification.new do |s|
20
20
  s.metadata = { "logstash_plugin" => "true", "logstash_group" => "output" }
21
21
 
22
22
  # Gem dependencies
23
- s.add_runtime_dependency "logstash-core", '>= 1.4.0', '< 2.0.0'
23
+ s.add_runtime_dependency "logstash-core", "~> 2.0.0.snapshot"
24
24
  s.add_runtime_dependency 'logstash-mixin-aws'
25
- s.add_runtime_dependency 'stud', '~> 0.0.18'
25
+ s.add_runtime_dependency 'stud', '~> 0.0.22'
26
26
  s.add_development_dependency 'logstash-devutils'
27
27
  s.add_development_dependency 'logstash-input-generator'
28
- s.add_development_dependency 'logstash-input-stdin'
29
28
  s.add_development_dependency 'logstash-codec-line'
30
29
  end
31
30
 
@@ -50,7 +50,7 @@ describe LogStash::Outputs::S3 do
50
50
  s3.register
51
51
 
52
52
  expect(Dir.exist?(temporary_directory)).to eq(true)
53
- s3.teardown
53
+ s3.close
54
54
  FileUtils.rm_r(temporary_directory)
55
55
  end
56
56
 
@@ -194,7 +194,7 @@ describe LogStash::Outputs::S3 do
194
194
  end
195
195
 
196
196
  after(:each) do
197
- s3.teardown
197
+ s3.close
198
198
  tmp.close
199
199
  tmp.unlink
200
200
  end
@@ -328,7 +328,7 @@ describe LogStash::Outputs::S3 do
328
328
  s3.receive(event)
329
329
  event_count += 1
330
330
  end
331
- s3.teardown
331
+ s3.close
332
332
 
333
333
  generated_files = Dir[File.join(temporary_directory, 'ls.*.txt')]
334
334
 
metadata CHANGED
@@ -1,35 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-s3
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-30 00:00:00.000000000 Z
11
+ date: 2015-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
- - - '>='
17
- - !ruby/object:Gem::Version
18
- version: 1.4.0
19
- - - <
16
+ - - ~>
20
17
  - !ruby/object:Gem::Version
21
- version: 2.0.0
18
+ version: 2.0.0.snapshot
22
19
  name: logstash-core
23
20
  prerelease: false
24
21
  type: :runtime
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
- - - '>='
28
- - !ruby/object:Gem::Version
29
- version: 1.4.0
30
- - - <
24
+ - - ~>
31
25
  - !ruby/object:Gem::Version
32
- version: 2.0.0
26
+ version: 2.0.0.snapshot
33
27
  - !ruby/object:Gem::Dependency
34
28
  requirement: !ruby/object:Gem::Requirement
35
29
  requirements:
@@ -49,7 +43,7 @@ dependencies:
49
43
  requirements:
50
44
  - - ~>
51
45
  - !ruby/object:Gem::Version
52
- version: 0.0.18
46
+ version: 0.0.22
53
47
  name: stud
54
48
  prerelease: false
55
49
  type: :runtime
@@ -57,7 +51,7 @@ dependencies:
57
51
  requirements:
58
52
  - - ~>
59
53
  - !ruby/object:Gem::Version
60
- version: 0.0.18
54
+ version: 0.0.22
61
55
  - !ruby/object:Gem::Dependency
62
56
  requirement: !ruby/object:Gem::Requirement
63
57
  requirements:
@@ -86,20 +80,6 @@ dependencies:
86
80
  - - '>='
87
81
  - !ruby/object:Gem::Version
88
82
  version: '0'
89
- - !ruby/object:Gem::Dependency
90
- requirement: !ruby/object:Gem::Requirement
91
- requirements:
92
- - - '>='
93
- - !ruby/object:Gem::Version
94
- version: '0'
95
- name: logstash-input-stdin
96
- prerelease: false
97
- type: :development
98
- version_requirements: !ruby/object:Gem::Requirement
99
- requirements:
100
- - - '>='
101
- - !ruby/object:Gem::Version
102
- version: '0'
103
83
  - !ruby/object:Gem::Dependency
104
84
  requirement: !ruby/object:Gem::Requirement
105
85
  requirements:
@@ -120,7 +100,6 @@ executables: []
120
100
  extensions: []
121
101
  extra_rdoc_files: []
122
102
  files:
123
- - .gitignore
124
103
  - CHANGELOG.md
125
104
  - CONTRIBUTORS
126
105
  - DEVELOPER.md
@@ -128,7 +107,6 @@ files:
128
107
  - LICENSE
129
108
  - NOTICE.TXT
130
109
  - README.md
131
- - Rakefile
132
110
  - lib/logstash/outputs/s3.rb
133
111
  - logstash-output-s3.gemspec
134
112
  - spec/integration/s3_spec.rb
data/.gitignore DELETED
@@ -1,4 +0,0 @@
1
- *.gem
2
- Gemfile.lock
3
- .bundle
4
- vendor
data/Rakefile DELETED
@@ -1,7 +0,0 @@
1
- @files=[]
2
-
3
- task :default do
4
- system("rake -T")
5
- end
6
-
7
- require "logstash/devutils/rake"