This library lets you send metrics gathered by the ekg family of packages (e.g. ekg-core and ekg) to a log for reading via a service plugin like Server Density, piping to a pub/sub queue, or whatever you want.
Exporting metrics to a log is simple, create an empty metric store and register some metrics:
import System.Metrics import System.Local.Monitoring.Log main = do store <- newStore registerGcMetrics store forkEkgLog defaultLogOptions store ...
forkEkgLog
starts a new thread that periodically appends your
metrics to a specified log file.