Plugins using this library.
```rust
extern crate mackerel_plugin; extern crate rand;
use std::collections::HashMap; use mackerel_plugin::*;
struct DicePlugin {}
impl Plugin for DicePlugin {
fn fetchmetrics(&self) -> Result
fn graph_definition(&self) -> Vec<Graph> {
vec![
graph! {
name: "dice",
label: "My Dice",
unit: "integer",
metrics: [
{ name: "d6", label: "Die 6" },
{ name: "d20", label: "Die 20" },
]
},
]
}
}
fn main() { let plugin = DicePlugin {}; match plugin.run() { Ok(_) => {}, Err(err) => { eprintln!("mackerel-plugin-dice: {}", err); std::process::exit(1); } } } ```
itchyny (https://github.com/itchyny)
This software is released under the MIT License, see LICENSE.