sensu-plugins-aws 7.0.0 → 7.0.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 +4 -4
- data/CHANGELOG.md +10 -1
- data/bin/check-cloudwatch-composite-metric.rb +2 -12
- data/bin/check-cloudwatch-metric.rb +3 -3
- data/lib/sensu-plugins-aws/cloudwatch-common.rb +10 -0
- data/lib/sensu-plugins-aws/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e9b5f1eb3c12c84948ef04dfdccdfbf88fb8a87
|
4
|
+
data.tar.gz: cda4f9fef7a375bf9c55ace21b3b8bd006cbda5c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8cd56ed479d985a5d112b3f53fed0b19f8d4dd8c4fb0c8f84d0ea7853608c64e379e88f8d1cc0adfc73b8d1e599983f077cdbb8c6632a7160b2242b1e8c5b06
|
7
|
+
data.tar.gz: d18444784a229eabbeec567ac296181970d7c8243a517a6533840cfe49e6ded4abb761fe276a143711f6502aa321ea7e5bed4c326f98a6bfa72a9436a9652c64
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,14 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
7
|
|
8
|
+
## [7.0.1] - 2017-08-12
|
9
|
+
### Fixed
|
10
|
+
- check-cloudwatch-metric.rb, check-cloudwatch-composite-metric.rb: fixed defaults to work (@majormoses)
|
11
|
+
- check-cloudwatch-metric.rb: short option `-n` was conflicting with `no_data_ok` and `namespace` as `check-cloudwatch-composite-metric.rb` uses `-O` I opted for that for consistency (@majormoses)
|
12
|
+
|
13
|
+
### Changed
|
14
|
+
- check-cloudwatch-metric.rb, check-cloudwatch-composite-metric.rb: `self.parse_dimensions` and `dimension_string` were the same in both checks This fix was common mamong both checks so I moved it into the module
|
15
|
+
|
8
16
|
## [7.0.0] - 2017-08-07
|
9
17
|
### Breaking Change
|
10
18
|
- Bump min dependency on `sensu-plugin` to 2.x (@huynt1979)
|
@@ -336,7 +344,8 @@ WARNING: This release contains major breaking changes that will impact all user
|
|
336
344
|
### Added
|
337
345
|
- initial release
|
338
346
|
|
339
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/7.0.
|
347
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/7.0.1...HEAD
|
348
|
+
[7.0.1]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/7.0.0...7.0.1
|
340
349
|
[7.0.0]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/6.3.0...7.0.0
|
341
350
|
[6.3.0]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/6.2.0...6.3.0
|
342
351
|
[6.2.0]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/6.1.1...6.2.0
|
@@ -63,8 +63,8 @@ class CloudWatchCompositeMetricCheck < Sensu::Plugin::Check::CLI
|
|
63
63
|
description: 'Comma delimited list of DimName=Value',
|
64
64
|
short: '-d DIMENSIONS',
|
65
65
|
long: '--dimensions DIMENSIONS',
|
66
|
-
proc: proc { |d|
|
67
|
-
default:
|
66
|
+
proc: proc { |d| CloudwatchCommon.parse_dimensions d },
|
67
|
+
default: []
|
68
68
|
|
69
69
|
option :period,
|
70
70
|
description: 'CloudWatch metric statistics period. Must be a multiple of 60',
|
@@ -112,16 +112,6 @@ class CloudWatchCompositeMetricCheck < Sensu::Plugin::Check::CLI
|
|
112
112
|
|
113
113
|
include CloudwatchCommon
|
114
114
|
|
115
|
-
def self.parse_dimensions(dimension_string)
|
116
|
-
dimension_string.split(',')
|
117
|
-
.collect { |d| d.split '=' }
|
118
|
-
.collect { |a| { name: a[0], value: a[1] } }
|
119
|
-
end
|
120
|
-
|
121
|
-
def dimension_string
|
122
|
-
config[:dimensions].map { |d| "#{d[:name]}=#{d[:value]}" }.join('&')
|
123
|
-
end
|
124
|
-
|
125
115
|
def metric_desc
|
126
116
|
"#{config[:namespace]}-#{config[:numerator_metric_name]}/#{config[:denominator_metric_name]}(#{dimension_string})"
|
127
117
|
end
|
@@ -54,8 +54,8 @@ class CloudWatchMetricCheck < Sensu::Plugin::Check::CLI
|
|
54
54
|
description: 'Comma delimited list of DimName=Value',
|
55
55
|
short: '-d DIMENSIONS',
|
56
56
|
long: '--dimensions DIMENSIONS',
|
57
|
-
proc: proc { |d|
|
58
|
-
default:
|
57
|
+
proc: proc { |d| CloudwatchCommon.parse_dimensions d },
|
58
|
+
default: []
|
59
59
|
|
60
60
|
option :period,
|
61
61
|
description: 'CloudWatch metric statistics period. Must be a multiple of 60',
|
@@ -95,7 +95,7 @@ class CloudWatchMetricCheck < Sensu::Plugin::Check::CLI
|
|
95
95
|
default: 'greater'
|
96
96
|
|
97
97
|
option :no_data_ok,
|
98
|
-
short: '-
|
98
|
+
short: '-O',
|
99
99
|
long: '--allow-no-data',
|
100
100
|
description: 'Returns ok if no data is returned from the metric',
|
101
101
|
boolean: true,
|
@@ -83,6 +83,16 @@ module CloudwatchCommon
|
|
83
83
|
end
|
84
84
|
end
|
85
85
|
|
86
|
+
def self.parse_dimensions(dimension_string)
|
87
|
+
dimension_string.split(',')
|
88
|
+
.collect { |d| d.split '=' }
|
89
|
+
.collect { |a| { name: a[0], value: a[1] } }
|
90
|
+
end
|
91
|
+
|
92
|
+
def dimension_string
|
93
|
+
config[:dimensions].map { |d| "#{d[:name]}=#{d[:value]}" }.join('&')
|
94
|
+
end
|
95
|
+
|
86
96
|
def check(config)
|
87
97
|
resp = client.get_metric_statistics(metrics_request(config))
|
88
98
|
|
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: 7.0.
|
4
|
+
version: 7.0.1
|
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: 2017-08-
|
11
|
+
date: 2017-08-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|