bin/check-dns-zone.rb in sensu-plugins-dns-2.0.0 vs bin/check-dns-zone.rb in sensu-plugins-dns-2.1.0

- old
+ new

@@ -69,10 +69,11 @@ end def check_whois(entries) errors = [] success = [] - record = Whois.whois(config[:domain]) + client = Whois::Client.new(timeout: config[:timeout]) + record = client.lookup(config[:domain]) parser = record.parser additional_text = "(whois #{parser.nameservers.map(&:name)}) (dig #{entries})" if Set.new(parser.nameservers.map(&:name)) == Set.new(entries) success << "Resolved #{config[:domain]} #{config[:type]} equal with whois #{additional_text}" else