sensu-plugins-aws 2.4.3 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/CHANGELOG.md +11 -1
- data/bin/check-rds.rb +16 -3
- data/lib/sensu-plugins-aws/version.rb +3 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Njk5MmJjMzA1ZDFhYTJjZmM5YjZiZDcxOWFkODdhMzY4MDc5YTc5Nw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Y2JhMGFkNTg5YzEwNTNkNDc5YzYyMzZlYjI2ZDExZGFkNWZhNTM4MQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NTU1NjYzNWRiYjVkMTdhOGUxOTUwODI2NzJmMTdkZDk3YWJkZTM2YmMxMGNh
|
10
|
+
NjVjZTA2OTk3ZDRjMzc4NWRjZjI5OWJhZDRhNjBiOTYwMTgyNjIxMjgxOGRj
|
11
|
+
NTQ0ZjIzOTYyZWE0YmNiZjQ1NDBiNDE1OGVmNzc0MTA0Y2ZhYzQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MWE4NThhNTEzNWNlMWMxMjhjNzY2ZDdjNDdmMGYxZjk3NjAzNjc5N2Q1N2Mx
|
14
|
+
ZWUwMzE3NTFiZmEzYzdjNGM3MmE5ZjM4ZGNkN2IxYTgyNmNlNGI3MDhhNGFk
|
15
|
+
Y2ViOWExMGU3MGQ4MGYxYmFmOWIzMDg0ZTlmOGMzMjA0ZTAyNTE=
|
data/CHANGELOG.md
CHANGED
@@ -5,7 +5,16 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
7
|
|
8
|
+
## [3.0.0] - 2016-05-05
|
9
|
+
### Removed
|
10
|
+
- Support for Ruby 2.0
|
11
|
+
|
12
|
+
### Added
|
13
|
+
- Support for Ruby 2.3
|
14
|
+
- check-rds.rb: Added check for IOPS
|
15
|
+
|
8
16
|
## [2.4.3] - 2016-04-13
|
17
|
+
### Fixed
|
9
18
|
- check-ses-statistics.rb: fix variable
|
10
19
|
|
11
20
|
## [2.4.2] - 2016-04-13
|
@@ -174,7 +183,8 @@ WARNING: This release contains major breaking changes that will impact all user
|
|
174
183
|
### Added
|
175
184
|
- initial release
|
176
185
|
|
177
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/
|
186
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/3.0.0...HEAD
|
187
|
+
[3.0.0]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/v2.4.3...3.0.0
|
178
188
|
[2.4.3]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/v2.4.2...2.4.3
|
179
189
|
[2.4.2]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/v2.4.1...2.4.2
|
180
190
|
[2.4.1]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/v2.4.0...2.4.1
|
data/bin/check-rds.rb
CHANGED
@@ -28,6 +28,9 @@
|
|
28
28
|
# Warning if DatabaseConnections are over 100, critical over 120
|
29
29
|
# check-rds -i sensu-admin-db --connections-critical-over 120 --connections-warning-over 100 --statistics maximum --period 3600
|
30
30
|
#
|
31
|
+
# Warning if IOPS are over 100, critical over 200
|
32
|
+
# check-rds -i sensu-admin-db --iops-critical-over 200 --iops-warning-over 100 --period 300
|
33
|
+
#
|
31
34
|
# Warning if memory usage is over 80%, maximum of last 2 hour
|
32
35
|
# specifying "minimum" is intended actually since memory usage is calculated from CloudWatch "FreeableMemory" metric.
|
33
36
|
# check-rds -i sensu-admin-db --memory-warning-over 80 --statistics minimum --period 7200
|
@@ -110,7 +113,7 @@ class CheckRDS < Sensu::Plugin::Check::CLI
|
|
110
113
|
long: "--availability-zone-#{severity} AZ",
|
111
114
|
description: "Trigger a #{severity} if availability zone is different than given argument"
|
112
115
|
|
113
|
-
%w(cpu memory disk connections).each do |item|
|
116
|
+
%w(cpu memory disk connections iops).each do |item|
|
114
117
|
option :"#{item}_#{severity}_over",
|
115
118
|
long: "--#{item}-#{severity}-over N",
|
116
119
|
proc: proc(&:to_f),
|
@@ -246,6 +249,16 @@ class CheckRDS < Sensu::Plugin::Check::CLI
|
|
246
249
|
flag_alert severity, "; DatabaseConnections are #{sprintf '%d', @connections_metric_value} (expected lower than #{expected_lower_than})"
|
247
250
|
end
|
248
251
|
|
252
|
+
def check_iops(severity, expected_lower_than)
|
253
|
+
@read_iops_metric ||= cloud_watch_metric 'ReadIOPS', 'Count/Second'
|
254
|
+
@read_iops_metric_value ||= latest_value @read_iops_metric
|
255
|
+
@write_iops_metric ||= cloud_watch_metric 'WriteIOPS', 'Count/Second'
|
256
|
+
@write_iops_metric_value ||= latest_value @write_iops_metric
|
257
|
+
@iops_metric_value ||= @read_iops_metric_value + @write_iops_metric_value
|
258
|
+
return if @iops_metric_value < expected_lower_than
|
259
|
+
flag_alert severity, "; IOPS are #{sprintf '%d', @iops_metric_value} (expected lower than #{expected_lower_than})"
|
260
|
+
end
|
261
|
+
|
249
262
|
def run
|
250
263
|
if config[:db_instance_id].nil? || config[:db_instance_id].empty?
|
251
264
|
unknown 'No DB instance provided. See help for usage details'
|
@@ -261,12 +274,12 @@ class CheckRDS < Sensu::Plugin::Check::CLI
|
|
261
274
|
@severities.keys.each do |severity|
|
262
275
|
check_az severity, config[:"availability_zone_#{severity}"] if config[:"availability_zone_#{severity}"]
|
263
276
|
|
264
|
-
%w(cpu memory disk connections).each do |item|
|
277
|
+
%w(cpu memory disk connections iops).each do |item|
|
265
278
|
send "check_#{item}", severity, config[:"#{item}_#{severity}_over"] if config[:"#{item}_#{severity}_over"]
|
266
279
|
end
|
267
280
|
end
|
268
281
|
|
269
|
-
if %w(cpu memory disk connections).any? { |item| %w(warning critical).any? { |severity| config[:"#{item}_#{severity}_over"] } }
|
282
|
+
if %w(cpu memory disk connections iops).any? { |item| %w(warning critical).any? { |severity| config[:"#{item}_#{severity}_over"] } }
|
270
283
|
@message += "(#{config[:statistics].to_s.capitalize} within #{config[:period]}s "
|
271
284
|
@message += "between #{config[:end_time] - config[:period]} to #{config[:end_time]})"
|
272
285
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-aws
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sensu-Plugins and contributors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|
@@ -367,7 +367,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
367
367
|
requirements:
|
368
368
|
- - ! '>='
|
369
369
|
- !ruby/object:Gem::Version
|
370
|
-
version: 2.
|
370
|
+
version: 2.1.0
|
371
371
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
372
372
|
requirements:
|
373
373
|
- - ! '>='
|