Skip to content

Ryccoo/ruby-grafana-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A simple Ruby wrapper for the Grafana HTTP API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%