Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hartfordfive/ruby-grafana-api
A simple Ruby wrapper for the Grafana HTTP API
https://github.com/hartfordfive/ruby-grafana-api
grafana ruby
Last synced: about 1 month ago
JSON representation
A simple Ruby wrapper for the Grafana HTTP API
- Host: GitHub
- URL: https://github.com/hartfordfive/ruby-grafana-api
- Owner: hartfordfive
- License: mit
- Created: 2015-11-13T13:45:54.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-11-02T14:17:50.000Z (about 6 years ago)
- Last Synced: 2024-10-20T06:37:01.799Z (2 months ago)
- Topics: grafana, ruby
- Language: Ruby
- Size: 33.2 KB
- Stars: 25
- Watchers: 3
- Forks: 24
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# ruby-grafana-api
[![Gem Version](https://badge.fury.io/rb/grafana-api.svg)](https://badge.fury.io/rb/grafana-api)
## Description
A simple Ruby wrapper for the [Grafana](http://docs.grafana.org/reference/http_api/) HTTP API. To include in your project, simply require the grafana library:
```ruby
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:
```ruby
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:
```ruby
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
* [Admin](docs/ADMIN.md)
* [Dashboard](docs/DASHBOARD.md)
* [Datasource](docs/DATASOURCE.md)
* [Frontend](docs/FRONTEND.md)
* [Login](docs/LOGIN.md)
* [Organization](docs/ORGANIZATION.md)
* [Organizations](docs/ORGANIZATIONS.md)
* [Snapshot](docs/SNAPSHOT.md)
* [User](docs/USER.md)
* [Users](docs/USERS.md)## License
Covered by the MIT [license](LICENSE).