ども。cloudpack の かっぱ (@inokara) です。 追記(Sinatra と haproxy-ruby を使えば瞬殺だった) haproxy-ruby sudo gem install haproxy --no-ri --no-rdoc -V Sinatra アプリ require 'sinatra' require 'sinatra/reloader' require 'haproxy' require 'json' haproxy = HAProxy.read_stats '/var/run/haproxy.sock' info = haproxy.info statistics = haproxy.stats get '/info' do info.to_json end get '/stats' do statistics.to_json end 上記で Sinat
![Ruby で csv to json(HAProxy の CSV で提供される statistics な情報を JSON で取得したいな) | iret.media](https://cdn-ak-scissors.b.st-hatena.com/image/square/e6e43aa294bcf51e69d3088711b056945033597e/height=288;version=1;width=512/https%3A%2F%2Firet.media%2Fwp-content%2Fuploads%2F2015%2F07%2Feyecatch-ruby-2.png)