0.02
Repository is archived
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
A simple wrapper for the Grafana HTTP API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

~> 1.7
 Project Readme

ruby-grafana-api

Gem Version

Description

A simple Ruby wrapper for the Grafana HTTP API. To include in your project, simply require the grafana library:

require 'grafana'

Comments/Notes

If you come across a bug or if you have a request for a new feature, please open an issue.

Methods & Usage Examples

Creating an instance of the grafana api client:

options = {
  "debug" => false,
  "timeout" => 3,
  "ssl" => false
}
g = Grafana::Client.new('[GRAFANA_HOST]', [GRAFANA_PORT], '[GRAFANA_USER]', '[GRAFANA_PASS]', options)

Connecting to Grafana using an API key:

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

Individual Module Documentation

License

Covered by the MIT license.