sensu-plugins-aws 6.0.0 → 6.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -1
- data/bin/check-instance-events.rb +10 -6
- 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: b033a2356552a4236375fa098d94437d9c45ad95
|
4
|
+
data.tar.gz: caf3f47b3699ce4ded5de4be24880fe96d3d82e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c97e49b9ba0c8dccaffc218208a4f2a829d6dcc2e0ac5aba7eb83d589f8217bd63aae4e85c6d5e5d2f78ad28415d459c98e0e9c681718a6ae6d5033c1091ea2
|
7
|
+
data.tar.gz: 8a6214038280fd0edd711ec63fc67503daded445fca460f04292b76f59f44dca6039a361dfa1a0447bd77ccd411f71f796e1f1187950e3b0445a759b3daabf9d
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
4
4
|
This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
|
+
## [6.0.1] 2017-05-11
|
8
|
+
### Fixed
|
9
|
+
- check-instance-events.rb: fix instance Name tag retrieval that broke upon aws sdk v2 update, and update output message handling (@swibowo)
|
10
|
+
|
7
11
|
## 6.0.0
|
8
12
|
### Breaking Change
|
9
13
|
- check-elb-nodes.rb returns critical instead of unknown if total number of nodes equals zero (@autarchprinceps)
|
@@ -303,7 +307,8 @@ WARNING: This release contains major breaking changes that will impact all user
|
|
303
307
|
### Added
|
304
308
|
- initial release
|
305
309
|
|
306
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/6.0.
|
310
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/6.0.1...HEAD
|
311
|
+
[6.0.1]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/6.0.0...6.0.1
|
307
312
|
[6.0.0]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/5.1.0...6.0.0
|
308
313
|
[5.1.0]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/5.1.0...5.0.0
|
309
314
|
[5.0.0]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/5.0.0...4.1.0
|
@@ -13,7 +13,7 @@
|
|
13
13
|
# Linux
|
14
14
|
#
|
15
15
|
# DEPENDENCIES:
|
16
|
-
# gem: aws-sdk
|
16
|
+
# gem: aws-sdk
|
17
17
|
# gem: sensu-plugin
|
18
18
|
#
|
19
19
|
# USAGE:
|
@@ -121,18 +121,22 @@ class CheckInstanceEvents < Sensu::Plugin::Check::CLI
|
|
121
121
|
i[:events].reject { |x| (x[:code] =~ /system-reboot|instance-reboot|instance-stop|system-maintenance/) && (x[:description] =~ /\[Completed\]|\[Canceled\]/) }
|
122
122
|
|
123
123
|
unless useful_events.empty?
|
124
|
+
name = ''
|
124
125
|
if config[:include_name]
|
125
|
-
name = ''
|
126
126
|
begin
|
127
127
|
instance_desc = ec2.describe_instances(instance_ids: [i[:instance_id]])
|
128
|
-
|
128
|
+
name_tag = instance_desc.reservations[0].instances[0].tags.find { |tag| tag[:key] == 'Name' }
|
129
|
+
name = name_tag.nil? ? '' : name_tag.value
|
129
130
|
rescue => e
|
130
131
|
puts "Issue getting instance details for #{i[:instance_id]} (#{r}). Exception = #{e}"
|
131
132
|
end
|
132
|
-
event_instances << "#{name} (#{i[:instance_id]} #{r}) (#{i[:events][0][:code]}) #{i[:events][0][:description]}"
|
133
|
-
else
|
134
|
-
event_instances << "#{i[:instance_id]} (#{r}) (#{i[:events][0][:code]}) #{i[:events][0][:description]}"
|
135
133
|
end
|
134
|
+
|
135
|
+
event_instances << if name.empty?
|
136
|
+
"#{i[:instance_id]} (#{r}) (#{i[:events][0][:code]}) #{i[:events][0][:description]}"
|
137
|
+
else
|
138
|
+
"#{name} (#{i[:instance_id]} #{r}) (#{i[:events][0][:code]}) #{i[:events][0][:description]}"
|
139
|
+
end
|
136
140
|
end
|
137
141
|
end
|
138
142
|
rescue => e
|
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: 6.0.
|
4
|
+
version: 6.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-05-
|
11
|
+
date: 2017-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|