network-carbon-1.0.15: A Haskell implementation of the Carbon protocol (part of the Graphite monitoring tools)
Safe HaskellNone
LanguageHaskell2010

Network.Carbon.Plaintext

Synopsis

Interacting with Carbon

Connections

data Connection Source #

Low-level representation of a Carbon connection. It's suggested that you construct this via connect. It is henceforth assumed that getPeerName will return something useful, which usually means connectionSocket should have been connected at least once.

Constructors

Connection 

Fields

Instances

Instances details
Eq Connection Source # 
Instance details

Defined in Network.Carbon.Plaintext

Show Connection Source # 
Instance details

Defined in Network.Carbon.Plaintext

connect :: SockAddr -> IO Connection Source #

Connect to Carbon.

disconnect :: Connection -> IO () Source #

Disconnect from Carbon. Note that it's still valid to sendMetrics to this Connection, and it will result in a reconnection.

Metrics

sendMetrics :: Connection -> Vector Metric -> IO () Source #

Send a collection of metrics to Carbon.

sendMetric :: Connection -> Text -> Double -> UTCTime -> IO () Source #

Send a single metric.

data Metric Source #

A single data point. A metric has a path that names it, a value, and the time the metric was sampled.

Constructors

Metric 

Instances

Instances details
Eq Metric Source # 
Instance details

Defined in Network.Carbon.Plaintext

Methods

(==) :: Metric -> Metric -> Bool #

(/=) :: Metric -> Metric -> Bool #

Show Metric Source # 
Instance details

Defined in Network.Carbon.Plaintext

Protocol details

encodeMetric :: Metric -> Builder Source #

Encode a Metric for transmission over the plain text protocol.