Skip to content

Commit

Permalink
Merge pull request #243 from ahoetker-deca/fix/haproxy-tools
Browse files Browse the repository at this point in the history
  • Loading branch information
smortex authored Sep 7, 2022
2 parents 29784ed + 2ef5b15 commit e541108
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/riemann/tools/haproxy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ def tick
def csv
http = ::Net::HTTP.new(@uri.host, @uri.port)
http.use_ssl = true if @uri.scheme == 'https'
http.start do |h|
res = http.start do |h|
get = ::Net::HTTP::Get.new(@uri.request_uri)
unless @uri.userinfo.nil?
userinfo = @uri.userinfo.split(':')
get.basic_auth userinfo[0], userinfo[1]
end
h.request get
end
CSV.parse(http.body.split('# ')[1], { headers: true })
CSV.parse(res.body.split('# ')[1], { headers: true })
end
end
end
Expand Down

0 comments on commit e541108

Please sign in to comment.