bin/check-vpc-nameservers.rb in sensu-plugins-aws-10.1.1 vs bin/check-vpc-nameservers.rb in sensu-plugins-aws-10.1.2
- old
+ new
@@ -63,10 +63,10 @@
options = ec2.describe_dhcp_options(dhcp_options_ids: [dhcp_option_id])
options.dhcp_options.each do |option|
option.dhcp_configurations.each do |map|
next if map.key != 'domain-name-servers'
- map.values.each do |value|
+ map.each_value do |value|
ip = value.value
config[:queries].each do |query|
begin
Resolv::DNS.open(nameserver: [ip]).getaddress(query)
rescue Resolv::ResolvError => res_err