riemann-0.1.1.0: A Riemann client for Haskell

Safe HaskellNone
LanguageHaskell2010

Network.Monitoring.Riemann

Synopsis

Documentation

module Data.Int

data Client Source #

Constructors

UDP 
TCP 

Fields

makeUDPClient :: Hostname -> Port -> IO Client Source #

Attempts to bind a UDP client at the passed Hostname and Port. Failures are silently ignored---failure in monitoring should not cause an application failure...

makeTCPClient :: Hostname -> Port -> IO Client Source #

Attempts to connect to given riemann server Returns an initialised TCP client that can later be used to send events to given riemann host/port. TCP Clients always try to reconnect to server when an event is sent and connection is either closed or in error.

isError :: MonadIO m => Client -> m Bool Source #

Checks whether or not a given Client is in an error state.

sendEventT :: Client -> Event -> ExceptT IOException IO Client Source #

Attempts to forward an event to a client. If it fails, it'll return an IOException in the ExceptT, otherwise it returns the passed Client, possibly modified to cope for changes in state.

sendEvent :: MonadIO m => Client -> Event -> m () Source #

Attempts to forward an event to a client. Fails silently.