Skip to content

StatsD

A Node.js daemon that collects counters and timers over UDP/TCP and forwards summaries to backends like Graphi

Stars
18.1k
Forks
1.9k
Licence
MIT
Language
JavaScript
Last update
1.5 years ago
Type
Other

No commits in over a year — check for forks or alternatives before adopting.

What it is

StatsD is a small network service that listens for simple numeric measurements, such as counts and timings, sent by your applications over UDP or TCP. It groups these values into named buckets, aggregates them over a flush interval (10 seconds by default), and sends the results to one or more backend services such as Graphite for storage and charting. It is typically used to keep track of how software is behaving in production.

  • Send a counter from a shell with echo and netcat to test that metrics arrive
  • Forward aggregated application counters and timers to Graphite
  • Run StatsD in Docker using the official image
  • Configure debugging options such as debug and dumpMessages to inspect incoming messages

Great for

  • Developers who want to track counters and timings from their applications
  • Teams already using Graphite or a similar time-series backend
  • Operators who want a lightweight, Node.js-based metrics relay
  • Anyone who needs to run a metrics daemon on a server they control

Not ideal for

  • Users who need a fully hosted monitoring service, since this README covers only the self-run daemon
  • Projects that need metric types or features not described in the README, since the README is truncated and only documents basic usage
  • Environments that cannot run Node.js, since the README states it runs on the Node.js platform
Step-by-step guide: how to use StatsDInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Clone and build from source

    You'll need: Node.js (Current and LTS versions are supported per the README)

    Clone the project

    git clone https://github.com/statsd/statsd.git

    Start the daemon with a config file

    node stats.js /path/to/config
  2. 2

    Run it

    • Install Node.js (Current or LTS version)
    • Clone the repository
    • Create a config file from exampleConfig.js and place it somewhere accessible
    • Start the daemon with node stats.js /path/to/config
    • Send a test metric with echo "foo:1|c" | nc -u -w0 127.0.0.1 8125
  3. 3

    Get the most out of it

    • Read the Metric Types documentation to choose between counters, timers and other types
    • Set up Graphite Integration to store and chart the aggregated values
    • Review Supported Backends to decide where flushed stats should go
    • Use the Admin TCP Interface and debug settings to inspect the running daemon
    • Consider the StatsD Cluster Proxy docs if you need to run multiple instances

Downloads

Strengths

  • Simple line protocol: metrics are sent as name:value|type text
  • Works over UDP or TCP and can forward to pluggable backends
  • MIT licensed with a long history, originally written at Etsy

Trade-offs

  • The README is truncated, so details on backends, metric types and configuration must be read in the linked docs
  • Uses a flush interval and aggregation model that you need to understand before reading results
  • Testing notes warn that live-server tests can occasionally reach a stuck state

How it compares

ProjectStarsTypeLevelUpdatedBest for
statsd (this)18.1kOtherintermediate1.5 years agoDevelopers who want to track counters and timings from their applications
telegraf17.9kAppintermediate4 days agoEngineers setting up server or system monitoring

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.