| Safe Haskell | None | 
|---|---|
| Language | Haskell2010 | 
System.Remote.Monitoring.Elastic
Description
This module lets you periodically flush metrics to a elastic backend. Example usage:
main = do
    store <- newStore
    forkElastic defaultElasticOptions storeYou probably want to include some of the predefined metrics defined
 in the ekg-core package, by calling e.g. the registerGcStats
 function defined in that package.
- data Elastic
 - elasticThreadId :: Elastic -> ThreadId
 - forkElastic :: ElasticOptions -> Store -> IO Elastic
 - data ElasticOptions = ElasticOptions {}
 - defaultElasticOptions :: ElasticOptions
 
The elastic syncer
A handle that can be used to control the elastic sync thread.
 Created by forkElastic.
elasticThreadId :: Elastic -> ThreadId Source #
The thread ID of the elastic sync thread. You can stop the sync by killing this thread (i.e. by throwing it an asynchronous exception.)
Arguments
| :: ElasticOptions | Options  | 
| -> Store | Metric store  | 
| -> IO Elastic | Elastic sync handle  | 
Create a thread that flushes the metrics in the store to elastic.
Elastic options
data ElasticOptions Source #
Options to control how to connect to the elastic server and how often to flush metrics. The flush interval should be shorter than the flush interval elastic itself uses to flush data to its backends.
Constructors
| ElasticOptions | |
Fields 
  | |
defaultElasticOptions :: ElasticOptions Source #
Defaults:
host="127.0.0.1"port=8125indexBase=metricbeatsindexByDate=TrueflushInterval=1000debug=False