perfdata/
lib.rs

1#![warn(missing_docs)]
2//! This library was created to fit basic needs for parsing and creating Performance Data
3//! ([Perfdata]) commonly used by check commands from monitoring engines like Icinga2 or Nagios.
4//!
5//! Usually the data will be turned into a time series, and - if defined - will be used to determine
6//! the status of a monitoring object based on [ThresholdRange]s.
7//!
8//! Parsing and output is implemented to the [Nagios Reference](https://nagios-plugins.org/doc/guidelines.html#AEN200).
9
10mod error;
11mod monitoring_status;
12mod perf;
13mod thresholds;
14
15pub use monitoring_status::MonitoringStatus;
16pub use perf::Perfdata;
17pub use perf::PerfdataSet;
18pub use thresholds::ThresholdRange;
19
20#[test]
21fn test_formatting() {
22    let result = std::process::Command::new("cargo")
23        .args(["fmt", "--all", "--", "--check"])
24        .status()
25        .unwrap();
26    assert!(result.success());
27}