selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

GitHub
statsd logo

Self-host statsd

v0.10.2

Metrics aggregation daemon for counters and timers

ReleaseOpen SourceMIT
Updated3 years ago
LanguageJavaScript
Setup difficultyEasy
Stars
18 077
Port
8125 (Default UDP port for incoming metrics)
Docker
statsd/statsd
Install with Node.js

What is statsd?

StatsD is a lightweight network daemon written in JavaScript that collects application metrics such as counters, timing values, and gauges over UDP or TCP, then flushes aggregated data to one or more backend services every 10 seconds by default. It was originally created at Etsy and inspired by a similar project at Flickr. Operators run it with Node.js directly or via an official Docker image, configure it through a JavaScript file, and point it at backends like Graphite, Console, or a Repeater. Additional third-party backend plugins extend support to databases, queues, and hosted monitoring services. The project remains MIT-licensed and actively maintained on GitHub.

statsd alternatives

Should you self-host statsd?

statsd scores 67/100 on selfhost.directory (how scoring works) and ranks #1 of 2 in Metrics. It has 18 077 GitHub stars, +3 in the last 30 days.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is easy: most people get it running in one sitting. An official Docker image is available. It is MIT-licensed and written mostly in JavaScript.

Its closest alternative on selfhost.directory is munin (60/100, 2 151 stars). statsd scores higher overall. See statsd vs munin side by side.

Features

  • Admin TCP interface
  • Counter metrics
  • Graphite backend
  • Histograms
  • Pluggable Backends
  • Sampling
  • TCP metric ingestion
  • Timing metrics with percentiles
  • UDP metric ingestion

statsd README

StatsD Join the chat at https://gitter.im/statsd/statsd Docker Pulls

A network daemon that runs on the Node.js platform and listens for statistics, like counters and timers, sent over UDP or TCP and sends aggregates to one or more pluggable backend services (e.g., Graphite).

Key Concepts

  • buckets

    Each stat is in its own "bucket". They are not predefined anywhere. Buckets can be named anything that will translate to Graphite (periods make folders, etc)

  • values

    Each stat will have a value. How it is interpreted depends on modifiers. In general values should be integers.

  • flush

    After the flush interval timeout (defined by config.flushInterval, default 10 seconds), stats are aggregated and sent to an upstream backend service.

How to install statsd

Install statsd with Node.js

  • Install Node.js (All Current and LTS Node.js versions are supported.)
  • Clone the project
  • Create a config file from exampleConfig.js and put it somewhere
  • Start the Daemon: node stats.js /path/to/config

How to configure statsd

  • backendsList of backend modules to load
  • serverWhich server module to load for receiving metrics (udp or tcp)

    values: udp, tcp

  • debugLog exceptions and print out more diagnostic info
  • dumpMessagesPrint debug info on incoming messages
  • config.flushInterval10 secondsTimeout after which stats are aggregated and sent to backend

More in Metrics

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…