StatsD website screenshot

StatsD

StatsD is the network daemon and UDP-based line protocol for application metrics, originally written at Etsy and now maintained at github.com/statsd/statsd. A StatsD client emits short text packets — counters, gauges, timers, histograms, sets, and meters — to a daemon that aggregates them in memory and flushes derived series to a backend such as Graphite, InfluxDB, Datadog, CloudWatch, or any of 30+ third-party sinks. The wire format is the canonical contract; dozens of language clients and several alternative servers (DogStatsD, Telegraf, gostatsd, brubeck, statsite, Veneur, bioyino) speak it with small, well-documented dialect extensions for tags, histograms, events, and service checks.

3 APIs 0 Features
AggregationDaemonDogStatsDLine ProtocolMetricsObservabilityOpen SourceStatsDTCPUDPWire Protocol

APIs

StatsD Wire Protocol

The StatsD wire protocol is a UTF-8, line-oriented, UDP-by-default packet format used to push application metrics from clients to a StatsD daemon. Each line takes the form `buck...

StatsD Admin Interface

The StatsD admin/management interface is a plain-text TCP service exposed on port 8126 (default), used to inspect daemon state and clear in-memory aggregates. Supported commands...

DogStatsD Wire Protocol

DogStatsD is the Datadog Agent's StatsD-compatible ingestion protocol. It is a strict superset of the StatsD wire format that adds first-class tag syntax (`|#k:v,k:v`), histogra...

Collections

Event Specifications

DogStatsD Wire Protocol

The DogStatsD wire protocol — Datadog's StatsD-compatible ingestion format. A strict superset of vanilla StatsD that adds first-class tag syntax (`|#k:v,k:v`), histogram (`|h`) ...

ASYNCAPI

StatsD Wire Protocol

The StatsD wire protocol: a UTF-8, line-oriented, UDP-by-default text format used by application code to push metrics to a StatsD daemon for in-memory aggregation. Each datagram...

ASYNCAPI

Semantic Vocabularies

Statsd Context

0 classes · 8 properties

JSON-LD

API Governance Rules

StatsD API Rules

7 rules · 1 errors 4 warnings 2 info

SPECTRAL

JSON Structure

Statsd Metric Instance Structure

0 properties

JSON STRUCTURE

Example Payloads

Dogstatsd Event Example

3 fields

EXAMPLE

Statsd Admin Stats Example

5 fields

EXAMPLE

Statsd Counter Example

3 fields

EXAMPLE

Statsd Gauge Delta Example

3 fields

EXAMPLE

Statsd Gauge Example

3 fields

EXAMPLE

Statsd Histogram Example

4 fields

EXAMPLE

Statsd Set Example

3 fields

EXAMPLE

Statsd Timer Example

4 fields

EXAMPLE

Resources

👥
GitHub
GitHub
🔗
License
License
📄
ChangeLog
ChangeLog
🔗
ContributorGuide
ContributorGuide
🔗
Wiki
Wiki
🔗
ProtocolSpec
ProtocolSpec
🔗
PackageRegistry
PackageRegistry
🔗
Issues
Issues
📦
SDKs
SDKs
📦
SDKs
SDKs
📦
SDKs
SDKs
📦
SDKs
SDKs
📦
SDKs
SDKs
📦
SDKs
SDKs
📦
SDKs
SDKs
📦
SDKs
SDKs
📦
SDKs
SDKs
📦
SDKs
SDKs
📦
SDKs
SDKs
📦
SDKs
SDKs
📦
SDKs
SDKs
📦
SDKs
SDKs
📦
SDKs
SDKs
📦
SDKs
SDKs
📦
SDKs
SDKs
📦
SDKs
SDKs
📦
SDKs
SDKs
📦
SDKs
SDKs
🔗
AlternativeServer
AlternativeServer
🔗
AlternativeServer
AlternativeServer
🔗
AlternativeServer
AlternativeServer
🔗
AlternativeServer
AlternativeServer
🔗
AlternativeServer
AlternativeServer
🔗
AlternativeServer
AlternativeServer
🔗
AlternativeServer
AlternativeServer
🔗
AlternativeServer
AlternativeServer
🔗
AlternativeServer
AlternativeServer
🔗
AlternativeServer
AlternativeServer
🔗
AlternativeServer
AlternativeServer
🔗
AlternativeServer
AlternativeServer
🔗
AlternativeServer
AlternativeServer
🔗
Backend
Backend
🔗
Backend
Backend
🔗
Backend
Backend
🔗
Backend
Backend
🔗
Backend
Backend
🔗
Backend
Backend
🔗
Backend
Backend
🔗
Backend
Backend
🔗
Backend
Backend

Sources

Raw ↑
opencollection: 1.0.0
info:
  name: StatsD Admin Interface
  version: 1.0.0
items:
- info:
    name: Stats
    type: folder
  items:
  - info:
      name: Get Server Stats
      type: http
    http:
      method: GET
      url: tcp://{host}:{port}/stats
    docs: Return the daemon's own self-stats — uptime in seconds, `messages.last_msg_seen` in seconds since the last metric
      was received, and `messages.bad_lines_seen` since startup. Backends append their own keys (e.g., `graphite.last_flush`,
      `graphite.flush_time`).
- info:
    name: Counters
    type: folder
  items:
  - info:
      name: List All Counters
      type: http
    http:
      method: GET
      url: tcp://{host}:{port}/counters
    docs: Dump the current value of every in-memory counter as a JSON-like object literal.
  - info:
      name: Delete Counters
      type: http
    http:
      method: POST
      url: tcp://{host}:{port}/delcounters
      body:
        type: json
        data: '{}'
    docs: Delete one or more counters by name. Wildcards are supported (e.g., `sandbox.test.*`).
- info:
    name: Gauges
    type: folder
  items:
  - info:
      name: List All Gauges
      type: http
    http:
      method: GET
      url: tcp://{host}:{port}/gauges
    docs: Dump the current value of every in-memory gauge.
  - info:
      name: Delete Gauges
      type: http
    http:
      method: POST
      url: tcp://{host}:{port}/delgauges
      body:
        type: json
        data: '{}'
    docs: Delete one or more gauges by name; wildcards supported.
- info:
    name: Timers
    type: folder
  items:
  - info:
      name: List All Timers
      type: http
    http:
      method: GET
      url: tcp://{host}:{port}/timers
    docs: Dump the raw value list collected for every in-memory timer since the last flush.
  - info:
      name: Delete Timers
      type: http
    http:
      method: POST
      url: tcp://{host}:{port}/deltimers
      body:
        type: json
        data: '{}'
    docs: Delete one or more timers by name; wildcards supported.
- info:
    name: Health
    type: folder
  items:
  - info:
      name: Get Health Status
      type: http
    http:
      method: GET
      url: tcp://{host}:{port}/health
    docs: Return the daemon's current health status as configured by `healthStatus`.
  - info:
      name: Set Health Status
      type: http
    http:
      method: POST
      url: tcp://{host}:{port}/health
      body:
        type: json
        data: '{}'
    docs: Set the daemon's health status to `up` or `down`. Useful for draining load balancers ahead of a deployment.
- info:
    name: Configuration
    type: folder
  items:
  - info:
      name: Dump Current Configuration
      type: http
    http:
      method: GET
      url: tcp://{host}:{port}/config
    docs: Return the currently loaded configuration document as a JSON-like object literal — equivalent to inspecting `exampleConfig.js`
      post-load.
bundled: true