Safe Haskell | None |
---|---|
Language | Haskell2010 |
- perfdataFromGearmanResult :: ByteString -> Either ParserError Perfdata
- perfdataFromDefaultTemplate :: ByteString -> Either ParserError Perfdata
- data Perfdata = Perfdata {}
- type MetricList = [(String, Metric)]
- data Metric = Metric {}
- data HostOrService
- data ServicePerfdata
- type ParserError = String
- perfdataServiceDescription :: Perfdata -> ByteString
- metricValueDefault :: Metric -> Double -> Double
- unknownMetricValue :: Metric -> Bool
Documentation
perfdataFromGearmanResult :: ByteString -> Either ParserError Perfdata Source
Takes the output of a Nagios check formatted according to [0] and reported by mod_gearman[1], and attempts to parse it into a Perfdata object. This should be used, for example, for consuming perfdata from mod_gearman check_result queues.
- 0
- : https:/nagios-plugins.orgdoc/guidelines.html
- 1
- : https:/labs.consol.denagiosmod-gearman
perfdataFromDefaultTemplate :: ByteString -> Either ParserError Perfdata Source
Extract perfdata from a Nagios perfdata item formatted according to the default template[0]. This is the format that is used in the perfdata spool files and consumed by pnp4nagios.
- 0
- Default templates defined in the Nagios source (xdata/xpddefault.h). Service perfdata: "[SERVICEPERFDATA]t$TIMET$t$HOSTNAME$t$SERVICEDESC$t$SERVICEEXECUTIONTIME$t$SERVICELATENCY$t$SERVICEOUTPUT$t$SERVICEPERFDATA$" Host perfdata: "[HOSTPERFDATA]t$TIMET$t$HOSTNAME$t$HOSTEXECUTIONTIME$t$HOSTOUTPUT$t$HOSTPERFDATA$"
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 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.
type ParserError = String Source
metricValueDefault :: Metric -> Double -> Double Source
unknownMetricValue :: Metric -> Bool Source