network-metrics-0.2.2: Send metrics to Ganglia, Graphite, and statsd.

Portabilitynon-portable (GHC extensions)
Stabilityexperimental
MaintainerBrendan Hay <brendan@soundcloud.com>
Safe HaskellSafe-Infered

Network.Metric.Sink.Ganglia

Contents

Description

 

Synopsis

Exported Types

data Slope Source

Allows gmetad and the PHP webfrontend to efficiently separate constant data metrics from volatile ones

data GangliaType Source

Metric types supported by Ganglia

data GangliaMetric Source

Concrete metric type used to emit metadata and value packets

data Ganglia Source

A handle to a Ganglia sink

Constructors

Ganglia Host Handle 

Instances

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

class Sink a whereSource

Sink resource to write metrics to

Methods

push :: Measurable b => a -> b -> IO ()Source

Write a metric to the sink.

close :: a -> IO ()Source

Close the sink - subsequent writes will throw an error.

Instances

Sink AnySink

Existential sink instance

Sink Ganglia 
Sink Graphite 
Sink Statsd 
Sink SinkHandle 

open :: Host -> HostName -> PortNumber -> IO AnySinkSource

Open a new Ganglia sink

Re-exports

type Group = ByteStringSource

Metric group

type Bucket = ByteStringSource

Metric bucket