Skip to content

Latest commit

 

History

History
45 lines (33 loc) · 800 Bytes

README.md

File metadata and controls

45 lines (33 loc) · 800 Bytes

GraphiteAggregator

Small graphite aggregator to push data each interval via UDP to graphite

Installation

The package can be installed by adding graphite_aggregator to your list of dependencies in mix.exs:

def deps do
  [
    {:graphite_aggregator, "~> 0.0.6"}
  ]
end

Configuration

Add process to be started as child in application.ex

children = [
	GraphiteAggregator
]
Supervisor.start_link(children, [])

Configuration to add to config.exs

config :graphite_aggregator,
  host: "graphite-host",
  port: 2025,
  prefix: "company.department.team.service.",
  interval: 60

Usage

Send metric to Graphite (default value is 1, default timestamp is now)

GraphiteAggregator.metric("key")

GraphiteAggregator.metric("key", 10)