Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Perfdata = Perfdata {}
- type MetricList = [(String, Metric)]
- data Metric = Metric {}
- data MetricValue
- data HostOrService
- data ServicePerfdata = ServicePerfdata {}
- uomFromString :: String -> UOM
- parseReturnCode :: Integral a => a -> Maybe ReturnState
- parseReturnState :: ByteString -> Maybe ReturnState
- parseMetricString :: ByteString -> Either ParserError MetricList
- data UOM
- = Second
- | Millisecond
- | Microsecond
- | Percent
- | Byte
- | Kilobyte
- | Megabyte
- | Gigabyte
- | Terabyte
- | Counter
- | NullUnit
- | UnknownUOM
- data ReturnState
- data Threshold
- perfdataServiceDescription :: Perfdata -> ByteString
- metricValueDefault :: Metric -> Double -> Double
- unknownMetricValue :: Metric -> Bool
- isMetricBase :: Metric -> Bool
- convertMetricToBase :: Metric -> Metric
- convertPerfdataToBase :: Perfdata -> Perfdata
Documentation
Encapsulates all the data in a check result that's relevant to metrics (we throw away things like the state type of HARD/SOFT).
type MetricList = [(String, Metric)] Source
List of metrics by metric name.
Encapsulates the data in a Nagios performance metric. A service can have several of these.
data MetricValue Source
Value of a performance metric. We may lose some data converting to doubles here; this may change in the future.
data HostOrService Source
The check type, either Service with associated ServiceData or Host.
data ServicePerfdata Source
The part of the check result that's specific to service checks, and doesn't appear in host checks.
uomFromString :: String -> UOM Source
parseReturnCode :: Integral a => a -> Maybe ReturnState Source
parseMetricString :: ByteString -> Either ParserError MetricList Source
Parse the component of the check output which contains the performance metrics (HOSTPERFDATA or SERVICEPERFDATA).
Nagios unit of measurement. NullUnit is an empty string in the check result; UnknownUOM indicates a failure to parse.
data ReturnState Source
Value of a minmaxwarn/crit threshold, subject to the same constraints as MetricValue.
metricValueDefault :: Metric -> Double -> Double Source
unknownMetricValue :: Metric -> Bool Source
isMetricBase :: Metric -> Bool Source