bin/metrics-newrelic.rb in sensu-plugins-newrelic-boutetnico-1.0.0 vs bin/metrics-newrelic.rb in sensu-plugins-newrelic-boutetnico-1.1.0

- old
+ new

@@ -1,6 +1,6 @@ -#! /usr/bin/env ruby +#!/usr/bin/env ruby # # newrelic-metrics # # DESCRIPTION: # Pull new relic metrics @@ -53,14 +53,14 @@ short: '-s SCHEME', long: '--scheme SCHEME', default: "#{Socket.gethostname}.newrelic" def run - rpm = 'http://rpm.newrelic.com' + rpm = 'https://rpm.newrelic.com' url = URI.parse(rpm) - res = Net::HTTP.start(url.host, url.port) do |http| + res = Net::HTTP.start(url.host, url.port, use_ssl: true) do |http| req = Net::HTTP::Get.new('/accounts.xml?include=application_health') req.add_field('x-api-key', config[:apikey]) http.request(req) end