A simple Ruby wrapper for the Grafana HTTP API. To include in your project, simply require the grafana library:
require 'grafana'
If you come across a bug or if you have a request for a new feature, please open an issue.
options = {
"debug" => false,
"timeout" => 3,
"ssl" => false
}
g = Grafana::Client.new('[GRAFANA_HOST]', [GRAFANA_PORT], '[GRAFANA_USER]', '[GRAFANA_PASS]', options)
options = {
"debug" => false,
"timeout" => 3,
"ssl" => false,
"headers" => {
"Authorization" => "Bearer eiJrIjoidTBsQWpicGR0SzFXD29aclExTjk1cVliMWREUVp0alAiLCJuIjoiR8JhZGFzaG3yFiwiawQIOjE2"
}
}
g = Grafana::Client.new('[GRAFANA_HOST]', [GRAFANA_PORT], nil, nil, options)
user and pass attributes are ignored when specifying Authorization header
Covered by the MIT license.