Crate nagiosplugin
source ·Expand description
Structs
- Represents a single item of a check. Multiple of these are used to form a Resource.
- Defines a metric with a required name and value. Also takes optional thresholds (warning, critical) minimum, maximum. Can also be set to ignore thresholds and have a fixed ServiceState.
- Represents a single performance metric.
- Newtype wrapper around a string to ensure only valid strings end up in the final output. This is used for the performance data / metric part of the output.
- Represents a single service / resource from the perspective of Icinga.
- The runner is a helper to run a function that returns a Result with a Resource and maps the error case to a ServiceState and a message. This is to avoid boilerplate in every plugin.
- This error is returned by the FromStr implementation of ServiceState.
- Newtype wrapper around a string to ensure only valid strings end up in the performance data.
Enums
- The result of a runner execution.
- Represents the state of a service / resource.
- Defines if a metric triggers if value is greater or less than the thresholds.
- This represents the unit for a metric. It can be one of the predefined units or a custom one. See Nagios Plugin Development Guidelines for more information.
- This error is returned if a UnitString is created with an invalid string.
Traits
- Implement this if you have a value which can be converted to a performance metric value.