nagiosplugin 0.5.2

A small helper library to make it easy to write nagios/icinga checks.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use anyhow::anyhow;

use nagiosplugin::{Resource, Runner};

fn main() {
    Runner::new().safe_run(do_check).print_and_exit()
}

// This example uses anyhow
fn do_check() -> Result<Resource, anyhow::Error> {
    // Do something which returns an error.
    return Err(anyhow!("something really bad happened"));
}