Send metrics to Ganglia, Graphite, and statsd.

Latest on Hackage:0.4

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow to host generated Haddocks.

OtherLicense licensed and maintained by Brendan Hay


Table of Contents


All modules including Network.Metric expose the same interfaces to sinks, and re-export the required types for constructing metrics.

Supported Sinks:

  • Network.Metric.Sink.Ganglia
  • Network.Metric.Sink.Graphite
  • Network.Metric.Sink.Statsd
  • Network.Metric.Sink.Stdout


{-# LANGUAGE OverloadedStrings #-}

import Network.Metric

main = do
    sink <- open Ganglia (Just "thishost") "localhost" "1234"
    -- Creates ganglia key: "" with an "int32" type
    push sink $ Counter "" "bucket" 1234
    close sink

Specific Sink:

{-# LANGUAGE OverloadedStrings #-}

import Network.Metric.Sink.Graphite

main = do
    sink <- open Nothing "localhost" "1234"
    -- Creates graphite key: ""
    push sink $ Counter "" "bucket" 1234
    close sink


Preliminary API documentation is available on Hackage.

The API is currently in flux, and conversion between the universal Counter, Gauge, and Timing ctors to the respective sink types is not yet completed.


For any problems, comments or feedback please create an issue here on GitHub.


network-metrics is released under the Mozilla Public License Version 2.0

Depends on 7 packages:
Used by 1 package:
comments powered byDisqus