From 99f6abefa2de64d657effdb0717a5926cb778342 Mon Sep 17 00:00:00 2001 From: Rajiv Date: Mon, 6 May 2019 15:59:35 +0530 Subject: [PATCH 1/2] Using aws service gems --- bin/check-alb-target-group-health.rb | 4 ++-- bin/check-cloudwatch-metric.rb | 4 ++-- bin/check-ebs-burst-limit.rb | 4 ++-- bin/check-elb-health-sdk.rb | 6 ++++-- bin/check-rds.rb | 6 ++++-- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/bin/check-alb-target-group-health.rb b/bin/check-alb-target-group-health.rb index 8c8e46af..7213a3f8 100755 --- a/bin/check-alb-target-group-health.rb +++ b/bin/check-alb-target-group-health.rb @@ -12,7 +12,7 @@ # Linux # # DEPENDENCIES: -# gem: aws-sdk +# gem: aws-sdk-elasticloadbalancingv2 # gem: sensu-plugin # # USAGE: @@ -30,7 +30,7 @@ # Released under the same terms as Sensu (the MIT license); see LICENSE # for details. -require 'aws-sdk' +require 'aws-sdk-elasticloadbalancingv2' require 'sensu-plugin/check/cli' require 'sensu-plugins-aws' diff --git a/bin/check-cloudwatch-metric.rb b/bin/check-cloudwatch-metric.rb index 6d599706..ab1a2758 100755 --- a/bin/check-cloudwatch-metric.rb +++ b/bin/check-cloudwatch-metric.rb @@ -13,7 +13,7 @@ # Linux # # DEPENDENCIES: -# gem: aws-sdk +# gem: aws-sdk-cloudwatch # gem: sensu-plugin # # USAGE: @@ -29,7 +29,7 @@ require 'sensu-plugins-aws' require 'sensu-plugin/check/cli' -require 'aws-sdk' +require 'aws-sdk-cloudwatch' class CloudWatchMetricCheck < Sensu::Plugin::Check::CLI option :aws_region, diff --git a/bin/check-ebs-burst-limit.rb b/bin/check-ebs-burst-limit.rb index 8fef68fe..e77a5a6c 100755 --- a/bin/check-ebs-burst-limit.rb +++ b/bin/check-ebs-burst-limit.rb @@ -13,7 +13,7 @@ # Linux # # DEPENDENCIES: -# gem: aws-sdk +# gem: aws-sdk-ec2 # gem: sensu-plugin # # USAGE: @@ -29,7 +29,7 @@ require 'sensu-plugin/check/cli' require 'sensu-plugins-aws' -require 'aws-sdk' +require 'aws-sdk-ec2' require 'net/http' class CheckEbsBurstLimit < Sensu::Plugin::Check::CLI diff --git a/bin/check-elb-health-sdk.rb b/bin/check-elb-health-sdk.rb index 25a62b11..282c3cb7 100755 --- a/bin/check-elb-health-sdk.rb +++ b/bin/check-elb-health-sdk.rb @@ -12,7 +12,8 @@ # Linux # # DEPENDENCIES: -# gem: aws-sdk +# gem: aws-sdk-elasticloadbalancing +# gem: aws-sdk-ec2 # gem: sensu-plugin # # USAGE: @@ -28,7 +29,8 @@ require 'sensu-plugin/check/cli' require 'sensu-plugins-aws' -require 'aws-sdk' +require 'aws-sdk-elasticloadbalancing' +require 'aws-sdk-ec2' class ELBHealth < Sensu::Plugin::Check::CLI include Common diff --git a/bin/check-rds.rb b/bin/check-rds.rb index 4a6673a7..968098b3 100755 --- a/bin/check-rds.rb +++ b/bin/check-rds.rb @@ -12,7 +12,8 @@ # Linux # # DEPENDENCIES: -# gem: aws-sdk +# gem: aws-sdk-rds +# gem: aws-sdk-cloudwatch # gem: sensu-plugin # # USAGE: @@ -54,7 +55,8 @@ # require 'sensu-plugin/check/cli' -require 'aws-sdk' +require 'aws-sdk-rds' +require 'aws-sdk-cloudwatch' require 'time' class CheckRDS < Sensu::Plugin::Check::CLI From 9ecb734dba14b9fc6a1f6fcd5e2fd983bdeebc7d Mon Sep 17 00:00:00 2001 From: Rajiv Date: Wed, 8 May 2019 18:22:46 +0530 Subject: [PATCH 2/2] Added cloudwatch dependency --- bin/check-ebs-burst-limit.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/check-ebs-burst-limit.rb b/bin/check-ebs-burst-limit.rb index e77a5a6c..48017e5c 100755 --- a/bin/check-ebs-burst-limit.rb +++ b/bin/check-ebs-burst-limit.rb @@ -14,6 +14,7 @@ # # DEPENDENCIES: # gem: aws-sdk-ec2 +# gem: aws-sdk-cloudwatch # gem: sensu-plugin # # USAGE: @@ -30,6 +31,7 @@ require 'sensu-plugin/check/cli' require 'sensu-plugins-aws' require 'aws-sdk-ec2' +require 'aws-sdk-cloudwatch' require 'net/http' class CheckEbsBurstLimit < Sensu::Plugin::Check::CLI