sensu-plugins-aws 11.4.1 → 11.4.2
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 +5 -1
- data/bin/check-s3-object.rb +5 -1
- data/lib/sensu-plugins-aws/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3b4059b3c6a9ba24eab831dae3dc63fc97ebf5ba35f0d89cc89962a7ec86f6b6
|
|
4
|
+
data.tar.gz: 21bb94be580dc82bca8a36e5cc6c777820af8d5deea681d0b761c0e983e52497
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7b6818bb17139ab28a6876913faea3502b412b484284bc4fa86e4cfa5d92f8db6a07f21b697bd2932a3930ac8fb112c0ef6c5702fa38d04210190a36d01090fc
|
|
7
|
+
data.tar.gz: f3cb83474edecdd41cb3bac7ca0d1c4bc995b007ec2809393633937fd57e1c7cb5543cb298349896510fc3ca372d869b7fca1fa3bf38d0bf877f059b4821be18
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
4
4
|
This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins/community/blob/master/HOW_WE_CHANGELOG.md)
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
|
+
## [11.4.2] - 2018-05-10
|
|
8
|
+
### Fixed
|
|
9
|
+
- Handle case where a prefix is used and no objects are found. (@akatch)
|
|
7
10
|
|
|
8
11
|
## [11.4.1] - 2018-05-07
|
|
9
12
|
### Fixed
|
|
@@ -470,7 +473,8 @@ WARNING: This release contains major breaking changes that will impact all user
|
|
|
470
473
|
### Added
|
|
471
474
|
- initial release
|
|
472
475
|
|
|
473
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/11.4.
|
|
476
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/11.4.2...HEAD
|
|
477
|
+
[11.4.2]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/11.4.1...11.4.2
|
|
474
478
|
[11.4.1]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/11.4.0...11.4.1
|
|
475
479
|
[11.4.0]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/11.3.1...11.4.0
|
|
476
480
|
[11.3.1]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/11.3.0...11.3.1
|
data/bin/check-s3-object.rb
CHANGED
|
@@ -158,12 +158,16 @@ class CheckS3Object < Sensu::Plugin::Check::CLI
|
|
|
158
158
|
elsif !config[:key_prefix].nil?
|
|
159
159
|
key_search = config[:key_prefix]
|
|
160
160
|
output = s3.list_objects(bucket: config[:bucket_name], prefix: key_search)
|
|
161
|
-
|
|
161
|
+
|
|
162
|
+
if output.contents.size.to_i < 1
|
|
163
|
+
critical "Object with prefix \"#{key_search}\" not found in bucket #{config[:bucket_name]}"
|
|
164
|
+
end
|
|
162
165
|
|
|
163
166
|
if output.contents.size.to_i > 1
|
|
164
167
|
critical "Your prefix \"#{key_search}\" return too much files, you need to be more specific"
|
|
165
168
|
end
|
|
166
169
|
|
|
170
|
+
key_fullname = output.contents[0].key
|
|
167
171
|
age = Time.now.to_i - output.contents[0].last_modified.to_i
|
|
168
172
|
size = output.contents[0].size
|
|
169
173
|
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: 11.4.
|
|
4
|
+
version: 11.4.2
|
|
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: 2018-05-
|
|
11
|
+
date: 2018-05-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: sensu-plugin
|