mackerel-client is a ruby library to access Mackerel (https://mackerel.io/).
require 'mackerel/client'
@mackerel = Mackerel::Client.new(:mackerel_api_key => "<Put your API key>")
host = @mackerel.get_host("<hostId>")
Add this line to your application's Gemfile:
gem 'mackerel-client'
And then execute:
bundle
Or install it yourself as:
gem install mackerel-client