Skip to content

Commit

Permalink
Fix rubocop failures for check-ebs-burst-limit.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanfetch authored and majormoses committed Aug 29, 2017
1 parent 2946b20 commit dcba33a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions bin/check-ebs-burst-limit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
require 'net/http'

class CheckEbsBurstLimit < Sensu::Plugin::Check::CLI

include CloudwatchCommon

option :aws_region,
Expand Down Expand Up @@ -68,9 +67,9 @@ def run
# Set the describe-volumes filter depending on whether -s was specified
if config[:check_self] == true
# Get the region from the availability zone, and override the -r option
my_instance_az = Net::HTTP.get( URI.parse('http://169.254.169.254/latest/meta-data/placement/availability-zone'))
my_instance_az = Net::HTTP.get(URI.parse('http://169.254.169.254/latest/meta-data/placement/availability-zone'))
Aws.config[:region] = my_instance_az.chop
my_instance_id = Net::HTTP.get( URI.parse('http://169.254.169.254/latest/meta-data/instance-id'))
my_instance_id = Net::HTTP.get(URI.parse('http://169.254.169.254/latest/meta-data/instance-id'))
volume_filters = [
{
name: 'attachment.instance-id',
Expand All @@ -89,7 +88,7 @@ def run

ec2 = Aws::EC2::Client.new
volumes = ec2.describe_volumes(
filters: volume_filters
filters: volume_filters
)
config[:metric_name] = 'BurstBalance'
config[:namespace] = 'AWS/EBS'
Expand Down

0 comments on commit dcba33a

Please sign in to comment.