logstash-input-cloudwatch_logs 0.10.0 → 0.10.1

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: 0792d0166cdc9a56dad01df68c80c1b5328f437c
4
- data.tar.gz: 61cadbd40105d2618df7e4dbf363874d3a37ee44
3
+ metadata.gz: 287e3dab84b5740b9e2f5c6601a6760d31b4680e
4
+ data.tar.gz: d6bb287f6ef7a479c3c31bb55523d2621baaafce
5
5
  SHA512:
6
- metadata.gz: cafe9292164f2d45606933163159af7157a78346253699d2e8ebe1614390eeeb1db23af44c124e6ced5f530b377a3f276d9e74ec8707bd89146e4684020acdf7
7
- data.tar.gz: 9c602ce2aa6436a0f47b6652124ab021a5e5a185c5a8dd235c36a611c311672ab5d1760f11e7292a6f94eaf1f10ea6c99d290b81eefc9c2a511735b3e83548c3
6
+ metadata.gz: cc31d24604f8043fcda1f1c718aa9057a3e1e601eb01b0d8ae38618a8550e091357139dab1331bb639b69f92d69be406988b6879c6c9e1bf5d4a7b5569b928a8
7
+ data.tar.gz: f5524805783b34d692d6f126943edb6f344e266cb6e4dcb19fa9080be85fc06f93ba01056708e2797600dd7ad8577334e2af8476f7704278a749e1d7505f0d0b
data/CHANGELOG.md CHANGED
@@ -0,0 +1,39 @@
1
+ # Release Notes for `logstash-input-cloudwatch_logs`
2
+
3
+ ## v0.10.1 (2017-04--19)
4
+
5
+ ### Fixed
6
+ * Fixed issue [#16](https://github.com/lukewaite/logstash-input-cloudwatch-logs/issues/16) which prevented loading the plugin ([#17](https://github.com/lukewaite/logstash-input-cloudwatch-logs/pull/17))
7
+
8
+ ## v0.10.0 (2017-04-01)
9
+
10
+ ### Added
11
+ * `log_group_prefix` parameter supporting ingesting a set of log groups matching a prefix ([#9](https://github.com/lukewaite/logstash-input-cloudwatch-logs/pull/9))
12
+
13
+ ### Fixed
14
+ * Step back when throttled by Amazon ([#9](https://github.com/lukewaite/logstash-input-cloudwatch-logs/pull/9))
15
+
16
+ ## v0.9.4 (2017-03-31)
17
+
18
+ ### Fixed
19
+ * Fix autoloading of aws-sdk ([#15](https://github.com/lukewaite/logstash-input-cloudwatch-logs/pull/15))
20
+
21
+ ## v0.9.3 (2016-12-22)
22
+
23
+ ### Added
24
+ * Support for Logstash version 5.x ([#6e7cc5d](https://github.com/lukewaite/logstash-input-cloudwatch-logs/commit/6e7cc5decdcd7a8d8528d42a7b040b1d2f3a3490))
25
+
26
+ ## v0.9.2 (2016-07-21)
27
+
28
+ ### Added
29
+ * Initial publish to RubyGems
30
+
31
+ ## v0.9.1 (2016-07-19)
32
+
33
+ ### Added
34
+ * Support for Logstash version 2.x ([#8824ae9](https://github.com/lukewaite/logstash-input-cloudwatch-logs/commit/8824ae9899fa0e1d0a627796479824bc6f5c39b2))
35
+
36
+ ## v0.9.0 (2015-07-06)
37
+
38
+ ### Initial Release
39
+ * This is the initial release of the input
@@ -7,6 +7,7 @@ require "time"
7
7
  require "tmpdir"
8
8
  require "stud/interval"
9
9
  require "stud/temporary"
10
+ require "aws-sdk"
10
11
  require "logstash/inputs/cloudwatch/patch"
11
12
 
12
13
  Aws.eager_autoload!
@@ -46,7 +47,6 @@ class LogStash::Inputs::CloudWatch_Logs < LogStash::Inputs::Base
46
47
  public
47
48
  def register
48
49
  require "digest/md5"
49
- require "aws-sdk"
50
50
 
51
51
  @logger.info("Registering cloudwatch_logs input", :log_group => @log_group)
52
52
 
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-input-cloudwatch_logs'
4
- s.version = '0.10.0'
4
+ s.version = '0.10.1'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = 'Stream events from CloudWatch Logs.'
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'
@@ -1,2 +1,37 @@
1
1
  # encoding: utf-8
2
2
  require "logstash/devutils/rspec/spec_helper"
3
+ require "logstash/inputs/cloudwatch_logs"
4
+ require "logstash/errors"
5
+ require "aws-sdk-resources"
6
+ require_relative "./support/helpers"
7
+
8
+ describe LogStash::Inputs::CloudWatch_Logs do
9
+ let(:sincedb_path) { Stud::Temporary.pathname }
10
+ let(:day) { 3600 * 24 }
11
+ let(:creds) { Aws::Credentials.new('1234', 'secret') }
12
+ let(:config) {
13
+ {
14
+ "access_key_id" => "1234",
15
+ "secret_access_key" => "secret",
16
+ "log_group" => "logstash-test-group",
17
+ "sincedb_path" => File.join(sincedb_path, ".sincedb")
18
+ }
19
+ }
20
+
21
+ before do
22
+ FileUtils.mkdir_p(sincedb_path)
23
+ Aws.config[:stub_responses] = true
24
+ Thread.abort_on_exception = true
25
+ end
26
+
27
+ context "when interrupting the plugin" do
28
+ let(:config) { super.merge({ "interval" => 5 }) }
29
+
30
+ before do
31
+ # expect_any_instance_of(LogStash::Inputs::CloudWatch_Logs).to receive(:list_new_streams_for_log_group).and_return(TestInfinteCloudWatchObject.new)
32
+ end
33
+
34
+ it_behaves_like "an interruptible input plugin"
35
+ end
36
+
37
+ end
@@ -0,0 +1,14 @@
1
+
2
+ class TestInfinteCloudWatchObject
3
+ def each
4
+ counter = 1
5
+
6
+ loop do
7
+ object = []
8
+ object.concat()
9
+
10
+ yield "awesome-#{counter}"
11
+ counter +=1
12
+ end
13
+ end
14
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-cloudwatch_logs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luke Waite
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-01 00:00:00.000000000 Z
11
+ date: 2017-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -88,6 +88,7 @@ files:
88
88
  - lib/logstash/inputs/cloudwatch_logs.rb
89
89
  - logstash-input-cloudwatch_logs.gemspec
90
90
  - spec/inputs/cloudwatch_logs_spec.rb
91
+ - spec/inputs/support/helpers.rb
91
92
  homepage: ''
92
93
  licenses:
93
94
  - Apache License (2.0)
@@ -116,3 +117,4 @@ specification_version: 4
116
117
  summary: Stream events from CloudWatch Logs.
117
118
  test_files:
118
119
  - spec/inputs/cloudwatch_logs_spec.rb
120
+ - spec/inputs/support/helpers.rb