hriemann-0.2.0.1: Initial project template from stack

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

type Event = Event Source #

class Metric a where Source #

Minimal complete definition

setMetric

Methods

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

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
   

attributes :: [Attribute] -> Event -> Event Source #

attribute :: String -> Maybe String -> Attribute Source #

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