logstash-input-cloudwatch 1.1.0 → 1.1.3

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: 12e012615fab932116207a718a61617805b92754
4
- data.tar.gz: 17d3562c62835108f5052ed4b4d2c7a88c6ba9a0
3
+ metadata.gz: c9c5921cbe00bcdaaa089a9f97d88863869be245
4
+ data.tar.gz: bb4bd43089b72c11db43c161078fdb8db65c8e5b
5
5
  SHA512:
6
- metadata.gz: b10649bfa6339894d72ce77bec5284cc03e98fe0a628381e5a5c1b3a456c20041498fd8abd4fa94e29b96d78b2507754b261694b981eae008c2d10df023dc05a
7
- data.tar.gz: 3de28fb2df9dbbc4fb196fdec9a50b9e95d58fcab03bc94faf15b913acfcee92f36fb0dc71313a9b866fcc8f999f9e8ad1c8fb42f382623fc228c9fbbb89f784
6
+ metadata.gz: 796ce12c39087a592b8da474e8efa57fca67ebfe30a5c8f95e801feb73e3a3e13e8b6059c27bcbfbb9fa484609ea2351edd84c733d4f40a9c0dddc542f83bc14
7
+ data.tar.gz: 6c29d8cabbc1c6f9ad0f6df5ed68d84ec02926cad2a794c05551e1a39527aa4786dbee4fdb61edd4d9cc87b2732b75ae567cfc613ba28084cc803116d8c5cb5f
@@ -0,0 +1,6 @@
1
+ # 1.1.3
2
+ - Depend on logstash-core-plugin-api instead of logstash-core, removing the need to mass update plugins on major releases of logstash
3
+ # 1.1.1
4
+ - New dependency requirements for logstash-core for the 5.0 release
5
+ ## 1.1.0
6
+ - Moved from jrgns/logstash-input-cloudwatch to logstash-plugins
@@ -108,7 +108,7 @@ class LogStash::Inputs::CloudWatch < LogStash::Inputs::Base
108
108
  # Volumes: { 'attachment.status' => 'attached' }
109
109
  # Each namespace uniquely support certian dimensions. Please consult the documentation
110
110
  # to ensure you're using valid filters.
111
- config :filters, :validate => :array
111
+ config :filters, :validate => :array, :required => true
112
112
 
113
113
  # Use this for namespaces that need to combine the dimensions like S3 and SNS.
114
114
  config :combined, :validate => :boolean, :default => false
@@ -143,14 +143,24 @@ class LogStash::Inputs::CloudWatch < LogStash::Inputs::Base
143
143
  end # loop
144
144
  end # def run
145
145
 
146
+ private
146
147
  def from_resources(queue, metric)
147
148
  # For every dimension in the metric
148
149
  resources.each_pair do |dimension, dim_resources|
149
150
  # For every resource in the dimension
150
151
  dim_resources = *dim_resources
151
152
  dim_resources.each do |resource|
153
+ @logger.info "Polling resource #{dimension}: #{resource}"
154
+ options = metric_options(@namespace, metric)
155
+ options[:dimensions] = [ { name: dimension, value: resource } ]
156
+ datapoints = clients['CloudWatch'].get_metric_statistics(options)
157
+ @logger.debug "DPs: #{datapoints.data}"
152
158
  # For every event in the resource
153
- fetch_resource_events(dimension, resource, metric_options(@namespace, metric)).each do |event|
159
+ datapoints[:datapoints].each do |event|
160
+ event.merge! options
161
+ event[dimension.to_sym] = resource
162
+ event = LogStash::Event.new(cleanup(event))
163
+ decorate(event)
154
164
  queue << event
155
165
  end
156
166
  end
@@ -175,20 +185,6 @@ class LogStash::Inputs::CloudWatch < LogStash::Inputs::Base
175
185
  end
176
186
  end
177
187
 
178
- private
179
- def fetch_resource_events(dimension, resource, options)
180
- @logger.info "Polling resource #{dimension}: #{resource}"
181
- options[:dimensions] = [ { name: dimension, value: resource } ]
182
- datapoints = clients['CloudWatch'].get_metric_statistics(options)
183
- @logger.debug "DPs: #{datapoints.data}"
184
- datapoints[:datapoints].each do |event|
185
- event.merge! options
186
- event[dimension.to_sym] = resource
187
- event = LogStash::Event.new(cleanup(event))
188
- decorate(event)
189
- end
190
- end
191
-
192
188
  private
193
189
  def cleanup(event)
194
190
  event.delete :statistics
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-input-cloudwatch'
3
- s.version = '1.1.0'
3
+ s.version = '1.1.3'
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"
@@ -10,7 +10,17 @@ Gem::Specification.new do |s|
10
10
  s.require_paths = ["lib"]
11
11
 
12
12
  # Files
13
- s.files = `git ls-files`.split($\)
13
+ s.files = Dir[
14
+ 'lib/**/*',
15
+ 'spec/**/*',
16
+ 'vendor/**/*',
17
+ '*.gemspec',
18
+ '*.md',
19
+ 'CONTRIBUTORS',
20
+ 'Gemfile',
21
+ 'LICENSE',
22
+ 'NOTICE.TXT'
23
+ ]
14
24
  # Tests
15
25
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
16
26
 
@@ -18,7 +28,7 @@ Gem::Specification.new do |s|
18
28
  s.metadata = { "logstash_plugin" => "true", "logstash_group" => "input" }
19
29
 
20
30
  # Gem dependencies
21
- s.add_runtime_dependency "logstash-core", '>= 1.4.0', '< 3.0.0'
31
+ s.add_runtime_dependency "logstash-core-plugin-api", "~> 1.0"
22
32
  s.add_runtime_dependency 'logstash-codec-plain'
23
33
  s.add_runtime_dependency 'stud', '>= 0.0.19'
24
34
  s.add_runtime_dependency 'logstash-mixin-aws'
metadata CHANGED
@@ -1,104 +1,98 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-cloudwatch
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.3
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: 2016-02-09 00:00:00.000000000 Z
11
+ date: 2016-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
+ name: logstash-core-plugin-api
14
15
  requirement: !ruby/object:Gem::Requirement
15
16
  requirements:
16
- - - '>='
17
+ - - "~>"
17
18
  - !ruby/object:Gem::Version
18
- version: 1.4.0
19
- - - <
20
- - !ruby/object:Gem::Version
21
- version: 3.0.0
22
- name: logstash-core
23
- prerelease: false
19
+ version: '1.0'
24
20
  type: :runtime
21
+ prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
- - - '>='
24
+ - - "~>"
28
25
  - !ruby/object:Gem::Version
29
- version: 1.4.0
30
- - - <
31
- - !ruby/object:Gem::Version
32
- version: 3.0.0
26
+ version: '1.0'
33
27
  - !ruby/object:Gem::Dependency
28
+ name: logstash-codec-plain
34
29
  requirement: !ruby/object:Gem::Requirement
35
30
  requirements:
36
- - - '>='
31
+ - - ">="
37
32
  - !ruby/object:Gem::Version
38
33
  version: '0'
39
- name: logstash-codec-plain
40
- prerelease: false
41
34
  type: :runtime
35
+ prerelease: false
42
36
  version_requirements: !ruby/object:Gem::Requirement
43
37
  requirements:
44
- - - '>='
38
+ - - ">="
45
39
  - !ruby/object:Gem::Version
46
40
  version: '0'
47
41
  - !ruby/object:Gem::Dependency
42
+ name: stud
48
43
  requirement: !ruby/object:Gem::Requirement
49
44
  requirements:
50
- - - '>='
45
+ - - ">="
51
46
  - !ruby/object:Gem::Version
52
47
  version: 0.0.19
53
- name: stud
54
- prerelease: false
55
48
  type: :runtime
49
+ prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
51
  requirements:
58
- - - '>='
52
+ - - ">="
59
53
  - !ruby/object:Gem::Version
60
54
  version: 0.0.19
61
55
  - !ruby/object:Gem::Dependency
56
+ name: logstash-mixin-aws
62
57
  requirement: !ruby/object:Gem::Requirement
63
58
  requirements:
64
- - - '>='
59
+ - - ">="
65
60
  - !ruby/object:Gem::Version
66
61
  version: '0'
67
- name: logstash-mixin-aws
68
- prerelease: false
69
62
  type: :runtime
63
+ prerelease: false
70
64
  version_requirements: !ruby/object:Gem::Requirement
71
65
  requirements:
72
- - - '>='
66
+ - - ">="
73
67
  - !ruby/object:Gem::Version
74
68
  version: '0'
75
69
  - !ruby/object:Gem::Dependency
70
+ name: logstash-devutils
76
71
  requirement: !ruby/object:Gem::Requirement
77
72
  requirements:
78
- - - '>='
73
+ - - ">="
79
74
  - !ruby/object:Gem::Version
80
75
  version: 0.0.16
81
- name: logstash-devutils
82
- prerelease: false
83
76
  type: :development
77
+ prerelease: false
84
78
  version_requirements: !ruby/object:Gem::Requirement
85
79
  requirements:
86
- - - '>='
80
+ - - ">="
87
81
  - !ruby/object:Gem::Version
88
82
  version: 0.0.16
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
83
+ description: This gem is a logstash plugin required to be installed on top of the
84
+ Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not
85
+ a stand-alone program
90
86
  email: jrgns@eagerelk.com
91
87
  executables: []
92
88
  extensions: []
93
89
  extra_rdoc_files: []
94
90
  files:
95
- - .gitignore
96
91
  - CHANGELOG.md
97
92
  - DEVELOPER.md
98
93
  - Gemfile
99
94
  - LICENSE
100
95
  - README.md
101
- - Rakefile
102
96
  - lib/logstash/inputs/cloudwatch.rb
103
97
  - logstash-input-cloudwatch.gemspec
104
98
  - spec/inputs/cloudwatch_spec.rb
@@ -108,24 +102,24 @@ licenses:
108
102
  metadata:
109
103
  logstash_plugin: 'true'
110
104
  logstash_group: input
111
- post_install_message:
105
+ post_install_message:
112
106
  rdoc_options: []
113
107
  require_paths:
114
108
  - lib
115
109
  required_ruby_version: !ruby/object:Gem::Requirement
116
110
  requirements:
117
- - - '>='
111
+ - - ">="
118
112
  - !ruby/object:Gem::Version
119
113
  version: '0'
120
114
  required_rubygems_version: !ruby/object:Gem::Requirement
121
115
  requirements:
122
- - - '>='
116
+ - - ">="
123
117
  - !ruby/object:Gem::Version
124
118
  version: '0'
125
119
  requirements: []
126
- rubyforge_project:
127
- rubygems_version: 2.4.5
128
- signing_key:
120
+ rubyforge_project:
121
+ rubygems_version: 2.2.2
122
+ signing_key:
129
123
  specification_version: 4
130
124
  summary: Retrieve stats from AWS CloudWatch.
131
125
  test_files:
data/.gitignore DELETED
@@ -1,5 +0,0 @@
1
- *.gem
2
- Gemfile.lock
3
- Gemfile.bak
4
- .bundle
5
- vendor
data/Rakefile DELETED
@@ -1 +0,0 @@
1
- require "logstash/devutils/rake"