Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/telia-oss/rustana

Rust client for Grafana
https://github.com/telia-oss/rustana

grafana rust

Last synced: about 1 month ago
JSON representation

Rust client for Grafana

Awesome Lists containing this project

README

        

## Rustana is a client for Grafana

[API documentation](https://docs.rs/rustana/0.0.2/rustana/)

# Installation
Rustana is available on [crates.io](https://crates.io/crates/rustana). To use Rustana in your Rust program built with Cargo, add it as a dependency.

```toml
[dependencies]
rustana = "0.0.2"
```

# Usage
Rustana containing Rust types for Grafana's API.
```rust
use rustana::GrafanaClient;

let mut client = GrafanaClient::new(&url, &token);

fn main() {
let dashboard_id = "FT5SF";
match client.get_dashboard_by_id(&dashboard_id) {
Ok(dashboard) => println!("Dashboard response: {:?}", dashboard),
Err(e) => println!("error fetching dashboard: {:?}", e),
}

}

```