| Portability | non-portable (GHC extensions) |
|---|---|
| Stability | experimental |
| Maintainer | Brendan Hay <brendan@soundcloud.com> |
| Safe Haskell | Safe-Infered |
Network.Metric.Sink.Ganglia
Description
- data Slope
- = Zero
- | Positive
- | Negative
- | Both
- | Unspecified
- data GangliaType
- data GangliaMetric = GangliaMetric {
- name :: Bucket
- type' :: GangliaType
- units :: ByteString
- value :: ByteString
- host :: ByteString
- spoof :: ByteString
- group :: Group
- slope :: Slope
- tmax :: Word32
- dmax :: Word32
- data Ganglia = Ganglia Host Handle
- defaultMetric :: GangliaMetric
- putMetaData :: GangliaMetric -> Put
- putValue :: GangliaMetric -> Put
- class Sink a where
- open :: Host -> HostName -> PortNumber -> IO AnySink
- type Group = ByteString
- type Bucket = ByteString
- data Metric
Exported Types
Allows gmetad and the PHP webfrontend to efficiently separate constant data metrics from volatile ones
Constructors
| Zero | |
| Positive | |
| Negative | |
| Both | |
| Unspecified |
data GangliaMetric Source
Concrete metric type used to emit metadata and value packets
Constructors
| GangliaMetric | |
Fields
| |
Instances
A handle to a Ganglia sink
Constructors
| Ganglia Host Handle |
Defaults
defaultMetric :: GangliaMetricSource
Sensible defaults for a GangliaMetric
Binary Encoding
putMetaData :: GangliaMetric -> PutSource
Encode a GangliaMetric's metadata into a Binary.Put monad
The format for this can be found in either: * gm_protocol.x in the Ganglia 3.1 sources * https:github.comlookfirstjmxtrans
putValue :: GangliaMetric -> PutSource
Encode a GangliaMetric's value into a Binary.Put monad
Sink Functions
Sink resource to write metrics to
Methods
push :: Measurable b => a -> b -> IO ()Source
Write a metric to the sink.
Close the sink - subsequent writes will throw an error.
Re-exports
type Group = ByteStringSource
Metric group
type Bucket = ByteStringSource
Metric bucket