bin/metrics-curl.rb in sensu-plugins-http-2.8.0 vs bin/metrics-curl.rb in sensu-plugins-http-2.8.1
- old
+ new
@@ -1,6 +1,8 @@
#!/usr/bin/env ruby
+# frozen_string_literal: true
+
#
# metrics-curl
#
# DESCRIPTION:
# Simple wrapper around curl for getting timing stats from the various phases
@@ -55,10 +57,10 @@
required: true,
default: "#{Socket.gethostname}.curl_timings"
def run
cmd = "curl --silent --output /dev/null #{config[:curl_args]} "
- cmd += '-w "%{time_total},%{time_namelookup},%{time_connect},%{time_pretransfer},%{time_redirect},%{time_starttransfer},%{http_code}" '
+ cmd += '-w %{time_total},%{time_namelookup},%{time_connect},%{time_pretransfer},%{time_redirect},%{time_starttransfer},%{http_code}" '
cmd += config[:url]
output = `#{cmd}`
(time_total, time_namelookup, time_connect, time_pretransfer, time_redirect, time_starttransfer, http_code) = output.split(',')