Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/telia-oss/rustana
- Owner: telia-oss
- License: mit
- Created: 2019-05-16T11:20:10.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-07-22T17:37:45.000Z (4 months ago)
- Last Synced: 2024-09-06T06:48:46.373Z (2 months ago)
- Topics: grafana, rust
- Language: Rust
- Size: 107 KB
- Stars: 3
- Watchers: 4
- Forks: 2
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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),
}}
```