logstash-input-cloudwatch 1.0.5 → 1.1.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: 17c540d7a20a9a027d8f3d3a483c63b871ea40bf
4
- data.tar.gz: ff5cb0761a21dcf7c0a5ac12256b297745d0338f
3
+ metadata.gz: 12e012615fab932116207a718a61617805b92754
4
+ data.tar.gz: 17d3562c62835108f5052ed4b4d2c7a88c6ba9a0
5
5
  SHA512:
6
- metadata.gz: 45ea7ee70851fde062119baeb8d21bea97ecae1f606d583ce00d2bc077ad92bad33e550f66a79577fcb4b295781c0808c3e588139e8fef520ce2202d80aec98a
7
- data.tar.gz: 5a800623a96fe46d36eb3b467b88c3d658e29490702814f362a347b471fa9b3f6755cc723b99986f32d0ee739bbee8d7d7dd415311195e519297d377e4caed40
6
+ metadata.gz: b10649bfa6339894d72ce77bec5284cc03e98fe0a628381e5a5c1b3a456c20041498fd8abd4fa94e29b96d78b2507754b261694b981eae008c2d10df023dc05a
7
+ data.tar.gz: 3de28fb2df9dbbc4fb196fdec9a50b9e95d58fcab03bc94faf15b913acfcee92f36fb0dc71313a9b866fcc8f999f9e8ad1c8fb42f382623fc228c9fbbb89f784
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2012–2015 Elasticsearch <http://www.elastic.co>
1
+ Copyright (c) 2012–2016 Elasticsearch <http://www.elastic.co>
2
2
 
3
3
  Licensed under the Apache License, Version 2.0 (the "License");
4
4
  you may not use this file except in compliance with the License.
@@ -4,6 +4,7 @@ require "logstash/namespace"
4
4
  require "logstash/plugin_mixins/aws_config"
5
5
  require "logstash/util"
6
6
  require "stud/interval"
7
+ require "aws-sdk"
7
8
 
8
9
  # Pull events from the Amazon Web Services CloudWatch API.
9
10
  #
@@ -119,7 +120,6 @@ class LogStash::Inputs::CloudWatch < LogStash::Inputs::Base
119
120
 
120
121
  public
121
122
  def register
122
- require "aws-sdk"
123
123
  AWS.config(:logger => @logger)
124
124
 
125
125
  raise 'Interval needs to be higher than period' unless @interval >= @period
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-input-cloudwatch'
3
- s.version = '1.0.5'
3
+ s.version = '1.1.0'
4
4
  s.licenses = ['Apache License (2.0)']
5
5
  s.summary = "Retrieve stats from AWS CloudWatch."
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/plugin install gemname. This gem is not a stand-alone program"
@@ -1 +1,66 @@
1
- require "logstash/devutils/rspec/spec_helper"
1
+ require 'logstash/devutils/rspec/spec_helper'
2
+ require 'logstash/inputs/cloudwatch'
3
+ require 'aws-sdk'
4
+
5
+ describe LogStash::Inputs::CloudWatch do
6
+ before do
7
+ AWS.stub!
8
+ Thread.abort_on_exception = true
9
+ end
10
+
11
+ describe '#register' do
12
+ let(:config) {
13
+ {
14
+ 'access_key_id' => '1234',
15
+ 'secret_access_key' => 'secret',
16
+ 'namespace' => 'AWS/EC2',
17
+ 'filters' => { 'instance-id' => 'i-12344321' },
18
+ 'region' => 'us-east-1'
19
+ }
20
+ }
21
+ subject { LogStash::Inputs::CloudWatch.new(config) }
22
+
23
+ it "registers succesfully" do
24
+ expect { subject.register }.to_not raise_error
25
+ end
26
+ end
27
+
28
+ context "EC2 events" do
29
+ let(:config) {
30
+ {
31
+ 'access_key_id' => '1234',
32
+ 'secret_access_key' => 'secret',
33
+ 'namespace' => 'AWS/EC2',
34
+ 'metrics' => [ 'CPUUtilization' ],
35
+ 'filters' => { 'tag:Monitoring' => 'Yes' },
36
+ 'region' => 'us-east-1'
37
+ }
38
+ }
39
+ end
40
+
41
+ context "EBS events" do
42
+ let(:config) {
43
+ {
44
+ 'access_key_id' => '1234',
45
+ 'secret_access_key' => 'secret',
46
+ 'namespace' => 'AWS/EBS',
47
+ 'metrics' => [ 'VolumeQueueLength' ],
48
+ 'filters' => { 'tag:Monitoring' => 'Yes' },
49
+ 'region' => 'us-east-1'
50
+ }
51
+ }
52
+ end
53
+
54
+ context "RDS events" do
55
+ let(:config) {
56
+ {
57
+ 'access_key_id' => '1234',
58
+ 'secret_access_key' => 'secret',
59
+ 'namespace' => 'AWS/RDS',
60
+ 'metrics' => [ 'CPUUtilization', 'CPUCreditUsage' ],
61
+ 'filters' => { 'EngineName' => 'mysql' },
62
+ 'region' => 'us-east-1'
63
+ }
64
+ }
65
+ end
66
+ end
metadata CHANGED
@@ -1,100 +1,98 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-cloudwatch
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jurgens du Toit
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-10 00:00:00.000000000 Z
11
+ date: 2016-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: logstash-core
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
- - - ">="
16
+ - - '>='
18
17
  - !ruby/object:Gem::Version
19
18
  version: 1.4.0
20
- - - "<"
19
+ - - <
21
20
  - !ruby/object:Gem::Version
22
21
  version: 3.0.0
23
- type: :runtime
22
+ name: logstash-core
24
23
  prerelease: false
24
+ type: :runtime
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - ">="
27
+ - - '>='
28
28
  - !ruby/object:Gem::Version
29
29
  version: 1.4.0
30
- - - "<"
30
+ - - <
31
31
  - !ruby/object:Gem::Version
32
32
  version: 3.0.0
33
33
  - !ruby/object:Gem::Dependency
34
- name: logstash-codec-plain
35
34
  requirement: !ruby/object:Gem::Requirement
36
35
  requirements:
37
- - - ">="
36
+ - - '>='
38
37
  - !ruby/object:Gem::Version
39
38
  version: '0'
40
- type: :runtime
39
+ name: logstash-codec-plain
41
40
  prerelease: false
41
+ type: :runtime
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - ">="
44
+ - - '>='
45
45
  - !ruby/object:Gem::Version
46
46
  version: '0'
47
47
  - !ruby/object:Gem::Dependency
48
- name: stud
49
48
  requirement: !ruby/object:Gem::Requirement
50
49
  requirements:
51
- - - ">="
50
+ - - '>='
52
51
  - !ruby/object:Gem::Version
53
52
  version: 0.0.19
54
- type: :runtime
53
+ name: stud
55
54
  prerelease: false
55
+ type: :runtime
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - ">="
58
+ - - '>='
59
59
  - !ruby/object:Gem::Version
60
60
  version: 0.0.19
61
61
  - !ruby/object:Gem::Dependency
62
- name: logstash-mixin-aws
63
62
  requirement: !ruby/object:Gem::Requirement
64
63
  requirements:
65
- - - ">="
64
+ - - '>='
66
65
  - !ruby/object:Gem::Version
67
66
  version: '0'
68
- type: :runtime
67
+ name: logstash-mixin-aws
69
68
  prerelease: false
69
+ type: :runtime
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
- - - ">="
72
+ - - '>='
73
73
  - !ruby/object:Gem::Version
74
74
  version: '0'
75
75
  - !ruby/object:Gem::Dependency
76
- name: logstash-devutils
77
76
  requirement: !ruby/object:Gem::Requirement
78
77
  requirements:
79
- - - ">="
78
+ - - '>='
80
79
  - !ruby/object:Gem::Version
81
80
  version: 0.0.16
82
- type: :development
81
+ name: logstash-devutils
83
82
  prerelease: false
83
+ type: :development
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
- - - ">="
86
+ - - '>='
87
87
  - !ruby/object:Gem::Version
88
88
  version: 0.0.16
89
- description: This gem is a logstash plugin required to be installed on top of the
90
- Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not
91
- a stand-alone program
89
+ 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
92
90
  email: jrgns@eagerelk.com
93
91
  executables: []
94
92
  extensions: []
95
93
  extra_rdoc_files: []
96
94
  files:
97
- - ".gitignore"
95
+ - .gitignore
98
96
  - CHANGELOG.md
99
97
  - DEVELOPER.md
100
98
  - Gemfile
@@ -110,24 +108,24 @@ licenses:
110
108
  metadata:
111
109
  logstash_plugin: 'true'
112
110
  logstash_group: input
113
- post_install_message:
111
+ post_install_message:
114
112
  rdoc_options: []
115
113
  require_paths:
116
114
  - lib
117
115
  required_ruby_version: !ruby/object:Gem::Requirement
118
116
  requirements:
119
- - - ">="
117
+ - - '>='
120
118
  - !ruby/object:Gem::Version
121
119
  version: '0'
122
120
  required_rubygems_version: !ruby/object:Gem::Requirement
123
121
  requirements:
124
- - - ">="
122
+ - - '>='
125
123
  - !ruby/object:Gem::Version
126
124
  version: '0'
127
125
  requirements: []
128
- rubyforge_project:
129
- rubygems_version: 2.4.8
130
- signing_key:
126
+ rubyforge_project:
127
+ rubygems_version: 2.4.5
128
+ signing_key:
131
129
  specification_version: 4
132
130
  summary: Retrieve stats from AWS CloudWatch.
133
131
  test_files: