sensu-plugins-aws 18.4.2 → 18.5.0
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-trustedadvisor-service-limits.rb +22 -14
- data/lib/sensu-plugins-aws/version.rb +2 -2
- metadata +66 -65
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 03f4c916797e5cf5b02b2de9788875d6175008be2bae70c5e7754c8bd083dec9
|
4
|
+
data.tar.gz: 78837fc4f758fecddb73e209f5e35c6ab1d2c375a21cde662790f9007506edd6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a28c21a2826a93d3bd786e4faa6f2bb2e2b646b618790ed59880399cb58c0840ea4703a07a4ece60a9654bcda4ecbf6c05b9699cc19de199dd87f4db5874f499
|
7
|
+
data.tar.gz: 380301c83eff91985a37f60e3ea52f5ea1717f71b1d83da1017a1a8a1038a1960d5182833f2fcd610cfb4c1ccaf2abce1ec4ff9756a09c97f998927df08f7bd6
|
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 [here](https://github.com/sensu-plugins/community/blob/master/HOW_WE_CHANGELOG.md)
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
|
+
## [18.5.0] - 2020-01-28
|
8
|
+
### Changed
|
9
|
+
- `check-trustedadvisor-service-limits.rb`: Trusted Advisor combined Service Limits check ID 'eW7HH0l7J9' scheduled to be disabled on Feb 15 2020. Updated the script to go through every Service Limits checks and look for not 'ok' status. Outcome is the same. (@swibowo)
|
10
|
+
- bumped version of `bundler` when installing to match travis, before installing dep ensure we have a required version of bundler for development (@majormoses)
|
7
11
|
|
8
12
|
## [18.4.2] - 2019-09-23
|
9
13
|
### Fixed
|
@@ -595,7 +599,8 @@ WARNING: This release contains major breaking changes that will impact all user
|
|
595
599
|
### Added
|
596
600
|
- initial release
|
597
601
|
|
598
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/18.
|
602
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/18.5.0...HEAD
|
603
|
+
[18.5.0]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/18.4.2...18.5.0
|
599
604
|
[18.4.2]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/18.4.1...18.4.2
|
600
605
|
[18.4.1]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/18.4.0...18.4.1
|
601
606
|
[18.4.0]: https://github.com/sensu-plugins/sensu-plugins-aws/compare/18.3.0...18.4.0
|
@@ -45,29 +45,37 @@ class CheckTrustedAdvisorServiceLimits < Sensu::Plugin::Check::CLI
|
|
45
45
|
description: "ISO 639-1 language code to be used when querying Trusted Advisor API. Only 'en' and 'ja' supported for now",
|
46
46
|
default: 'en'
|
47
47
|
|
48
|
-
def
|
48
|
+
def aws_support
|
49
49
|
# The Support endpoint seems to only available in us-east-1 region
|
50
50
|
# http://docs.aws.amazon.com/sdkforruby/api/Aws/Support.html
|
51
|
-
aws_support
|
51
|
+
@aws_support ||= Aws::Support::Client.new(region: 'us-east-1')
|
52
|
+
end
|
52
53
|
|
54
|
+
def run
|
53
55
|
service_limit_msg = []
|
54
56
|
|
55
57
|
begin
|
56
|
-
#
|
57
|
-
|
58
|
-
aws_support.
|
59
|
-
|
58
|
+
# Get all check IDs with category "service_limits"
|
59
|
+
check_ids = []
|
60
|
+
aws_support.describe_trusted_advisor_checks(language: config[:aws_language])[:checks].each { |c| check_ids << c.id if c.category == 'service_limits' }
|
61
|
+
|
62
|
+
# Get all checks that are not "ok"
|
63
|
+
checks_not_ok = []
|
64
|
+
aws_support.describe_trusted_advisor_check_summaries(check_ids: check_ids)[:summaries].each { |c| checks_not_ok << c.check_id if c.status != 'ok' }
|
65
|
+
|
66
|
+
checks_not_ok.each do |cno|
|
67
|
+
aws_support.describe_trusted_advisor_check_result(language: config[:aws_language], check_id: cno)[:result][:flagged_resources].each do |slr|
|
68
|
+
# Data structure will be as follow
|
69
|
+
# ["<region>", "<service>", "<description>", "<limit>", "<usage>", "<status>"]
|
70
|
+
sl_region, sl_service, sl_description, sl_limit, sl_usage, sl_status = slr[:metadata]
|
60
71
|
|
61
|
-
|
62
|
-
# Data structure will be as follow
|
63
|
-
# ["<region>", "<service>", "<description>", "<limit>", "<usage>", "<status>"]
|
64
|
-
sl_region, sl_service, sl_description, sl_limit, sl_usage, sl_status = slr[:metadata]
|
72
|
+
next if slr.status == 'ok' || sl_status == 'Green'
|
65
73
|
|
66
|
-
|
67
|
-
sl_usage = 0 if sl_usage.nil?
|
74
|
+
sl_usage = 0 if sl_usage.nil?
|
68
75
|
|
69
|
-
|
70
|
-
|
76
|
+
sl_msg = "#{sl_service} (#{sl_region}) #{sl_description} #{sl_usage} out of #{sl_limit}"
|
77
|
+
service_limit_msg.push(sl_msg)
|
78
|
+
end
|
71
79
|
end
|
72
80
|
rescue StandardError => e
|
73
81
|
unknown "An error occurred processing AWS TrustedAdvisor API: #{e.message}"
|
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: 18.
|
4
|
+
version: 18.5.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:
|
11
|
+
date: 2020-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sensu-plugin
|
@@ -134,14 +134,14 @@ dependencies:
|
|
134
134
|
requirements:
|
135
135
|
- - "~>"
|
136
136
|
- !ruby/object:Gem::Version
|
137
|
-
version: '1
|
137
|
+
version: '2.1'
|
138
138
|
type: :development
|
139
139
|
prerelease: false
|
140
140
|
version_requirements: !ruby/object:Gem::Requirement
|
141
141
|
requirements:
|
142
142
|
- - "~>"
|
143
143
|
- !ruby/object:Gem::Version
|
144
|
-
version: '1
|
144
|
+
version: '2.1'
|
145
145
|
- !ruby/object:Gem::Dependency
|
146
146
|
name: github-markup
|
147
147
|
requirement: !ruby/object:Gem::Requirement
|
@@ -248,86 +248,86 @@ description: |-
|
|
248
248
|
for EC2, SES, and SNS.
|
249
249
|
email: "<sensu-users@googlegroups.com>"
|
250
250
|
executables:
|
251
|
+
- check-reserved-instances.rb
|
252
|
+
- check-vpc-nameservers.rb
|
253
|
+
- metrics-autoscaling-instance-count.rb
|
254
|
+
- check-cloudwatch-alarm.rb
|
255
|
+
- check-dynamodb-throttle.rb
|
251
256
|
- check-cloudwatch-alarms.rb
|
252
|
-
- metrics-cloudfront.rb
|
253
|
-
- metrics-ses.rb
|
254
|
-
- check-ebs-burst-limit.rb
|
255
|
-
- handler-scale-asg-down.rb
|
256
|
-
- check-s3-bucket-visibility.rb
|
257
|
-
- check-trustedadvisor-service-limits.rb
|
258
257
|
- check-kms-key.rb
|
259
|
-
- check-ses-statistics.rb
|
260
|
-
- check-alb-target-group-health.rb
|
261
258
|
- check-ses-limit.rb
|
262
|
-
- check-sns-subscriptions.rb
|
263
|
-
- metrics-waf.rb
|
264
|
-
- metrics-autoscaling-instance-count.rb
|
265
259
|
- metrics-s3.rb
|
266
|
-
-
|
267
|
-
- check-
|
268
|
-
-
|
269
|
-
- check-ec2-
|
270
|
-
- check-
|
271
|
-
- metrics-
|
260
|
+
- handler-sns.rb
|
261
|
+
- check-s3-bucket-visibility.rb
|
262
|
+
- metrics-cloudfront.rb
|
263
|
+
- check-ec2-network.rb
|
264
|
+
- check-rds-events.rb
|
265
|
+
- metrics-rds.rb
|
272
266
|
- check-instances-count.rb
|
273
|
-
-
|
274
|
-
- check-
|
267
|
+
- metrics-sqs.rb
|
268
|
+
- check-emr-steps.rb
|
269
|
+
- check-ebs-burst-limit.rb
|
270
|
+
- check-redshift-events.rb
|
275
271
|
- check-instance-health.rb
|
276
|
-
- check-
|
277
|
-
-
|
278
|
-
- check-
|
279
|
-
- check-
|
280
|
-
- handler-ses.rb
|
281
|
-
- check-asg-instances-inservice.rb
|
272
|
+
- check-elb-health.rb
|
273
|
+
- handler-ec2_node.rb
|
274
|
+
- check-elb-instances-inservice.rb
|
275
|
+
- check-ec2-cpu_balance.rb
|
282
276
|
- check-sqs-messages.rb
|
283
277
|
- check-rds-pending.rb
|
284
|
-
- check-
|
285
|
-
- check-configservice-rules.rb
|
286
|
-
- check-beanstalk-elb-metric.rb
|
287
|
-
- check-elb-health.rb
|
288
|
-
- check-instance-reachability.rb
|
289
|
-
- check-emr-steps.rb
|
290
|
-
- check-elasticache-failover.rb
|
278
|
+
- check-emr-cluster.rb
|
291
279
|
- check-eip-allocation.rb
|
292
|
-
- check-s3-object.rb
|
293
|
-
- check-redshift-events.rb
|
294
|
-
- check-ecs-service-health.rb
|
295
|
-
- check-autoscaling-cpucredits.rb
|
296
|
-
- check-s3-bucket.rb
|
297
|
-
- check-elb-health-sdk.rb
|
298
|
-
- check-cloudwatch-alarm.rb
|
299
|
-
- check-route.rb
|
300
|
-
- check-ebs-snapshots.rb
|
301
280
|
- metrics-ec2-filter.rb
|
281
|
+
- check-ebs-snapshots.rb
|
282
|
+
- metrics-waf.rb
|
283
|
+
- metrics-billing.rb
|
284
|
+
- check-autoscaling-cpucredits.rb
|
285
|
+
- metrics-asg.rb
|
286
|
+
- check-instance-events.rb
|
302
287
|
- check-route53-domain-expiration.rb
|
303
|
-
-
|
304
|
-
- check-dynamodb-capacity.rb
|
288
|
+
- check-elasticache-failover.rb
|
305
289
|
- check-ec2-filter.rb
|
306
|
-
- check-asg-instances-created.rb
|
307
|
-
- check-eni-status.rb
|
308
|
-
- metrics-sqs.rb
|
309
|
-
- check-instance-events.rb
|
310
|
-
- metrics-elasticache.rb
|
311
|
-
- check-rds-events.rb
|
312
|
-
- check-subnet-ip-consumption.rb
|
313
|
-
- check-elb-nodes.rb
|
314
290
|
- check-elb-sum-requests.rb
|
291
|
+
- check-sns-subscriptions.rb
|
292
|
+
- metrics-ses.rb
|
315
293
|
- check-elb-health-fog.rb
|
316
|
-
- handler-sns.rb
|
317
294
|
- handler-scale-asg-up.rb
|
318
|
-
- check-
|
295
|
+
- check-sensu-client.rb
|
296
|
+
- check-elb-nodes.rb
|
297
|
+
- check-s3-object.rb
|
298
|
+
- check-trustedadvisor-service-limits.rb
|
299
|
+
- check-ses-statistics.rb
|
300
|
+
- check-cloudwatch-metric.rb
|
301
|
+
- check-beanstalk-health.rb
|
302
|
+
- check-dynamodb-capacity.rb
|
303
|
+
- check-eni-status.rb
|
304
|
+
- check-s3-tag.rb
|
305
|
+
- check-direct-connect-virtual-interfaces.rb
|
319
306
|
- check-cloudwatch-composite-metric.rb
|
320
|
-
-
|
307
|
+
- metrics-ec2-count.rb
|
308
|
+
- metrics-elasticache.rb
|
321
309
|
- check-cloudfront-tag.rb
|
322
|
-
-
|
323
|
-
- check-
|
324
|
-
- check-elb-instances-inservice.rb
|
310
|
+
- check-alb-target-group-health.rb
|
311
|
+
- check-elb-health-sdk.rb
|
325
312
|
- check-elb-latency.rb
|
326
|
-
-
|
327
|
-
-
|
313
|
+
- check-s3-bucket.rb
|
314
|
+
- handler-scale-asg-down.rb
|
315
|
+
- check-elb-certs.rb
|
316
|
+
- check-efs-metric.rb
|
328
317
|
- check-vpc-vpn.rb
|
329
|
-
- check-
|
318
|
+
- check-subnet-ip-consumption.rb
|
319
|
+
- check-ecs-service-health.rb
|
320
|
+
- check-rds.rb
|
321
|
+
- handler-ses.rb
|
322
|
+
- check-asg-instances-created.rb
|
323
|
+
- check-route.rb
|
324
|
+
- check-instance-reachability.rb
|
325
|
+
- check-certificate-expiry.rb
|
326
|
+
- check-asg-instances-inservice.rb
|
327
|
+
- metrics-emr-steps.rb
|
330
328
|
- metrics-elb.rb
|
329
|
+
- check-configservice-rules.rb
|
330
|
+
- check-beanstalk-elb-metric.rb
|
331
331
|
extensions: []
|
332
332
|
extra_rdoc_files: []
|
333
333
|
files:
|
@@ -444,7 +444,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
444
444
|
- !ruby/object:Gem::Version
|
445
445
|
version: '0'
|
446
446
|
requirements: []
|
447
|
-
|
447
|
+
rubyforge_project:
|
448
|
+
rubygems_version: 2.7.7
|
448
449
|
signing_key:
|
449
450
|
specification_version: 4
|
450
451
|
summary: Sensu plugins for working with an AWS environment
|