hriemann-0.3.3.4: A Riemann Client for Haskell
Safe HaskellNone
LanguageHaskell2010

Network.Monitoring.Riemann.Event

Description

Build an event which can then be sent to Riemann using a Client

Events are built by composing helper functions that set Riemann fields and applying to one of the Event constructors:

  E.ok "my service"
& E.description "my description"
& E.metric (length [ "some data" ])
& E.ttl 20
& E.tags ["tag1", "tag2"]

With this design you are encouraged to create an event with one of ok, warn or failure.

This has been done because we found that it is best to avoid services like my.service.success and my.service.error (that's what the Riemann state field is for).

You can use your own states using E.info & E.state "trace" however this is discouraged as it doesn't show up nicely in riemann-dash.

Synopsis

Documentation

class Metric a where Source #

Methods

setMetric :: a -> Event -> Event Source #

Instances

Instances details
Metric Double Source # 
Instance details

Defined in Network.Monitoring.Riemann.Event

Metric Float Source # 
Instance details

Defined in Network.Monitoring.Riemann.Event

Methods

setMetric :: Float -> Event -> Event Source #

Metric Int Source # 
Instance details

Defined in Network.Monitoring.Riemann.Event

Methods

setMetric :: Int -> Event -> Event Source #

Metric Int64 Source # 
Instance details

Defined in Network.Monitoring.Riemann.Event

Methods

setMetric :: Int64 -> Event -> Event Source #

Metric Integer Source # 
Instance details

Defined in Network.Monitoring.Riemann.Event

metric :: Metric a => a -> Event -> Event Source #

Note that since Riemann's protocol has separate types for integers, floats and doubles, you need to specify which type you are using. For example, this won't work:

   metric 1 myEvent
   

Instead use:

   metric (1 :: Int) myEvent
   

withDefaults :: Seq Event -> IO (Seq Event) Source #

Add local hostname and current time to an Event

This will not override any host or time in the provided event