StatsD Configuration API

Runtime Configuration Inspection

OpenAPI Specification

statsd-configuration-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: StatsD Admin Interface Configuration API
  version: 1.0.0
  description: OpenAPI projection of the StatsD admin/management interface. The native transport is a line-oriented plain-text protocol over TCP/8126 (default), not HTTP — but every supported command (`stats`, `counters`, `gauges`, `timers`, `delcounters`, `delgauges`, `deltimers`, `health [up|down]`, `config`, `quit`) is a self-contained request/response interaction with well-defined inputs and outputs and is therefore modeled here as a virtual `GET`/`POST` resource so that tools that consume OpenAPI (Spectral, MCP adapters, client generators) can reason about the surface.
  contact:
    name: StatsD Maintainers
    url: https://github.com/statsd/statsd
  license:
    name: MIT
    url: https://github.com/statsd/statsd/blob/master/LICENSE
servers:
- url: tcp://{host}:{port}
  description: Native admin TCP interface
  variables:
    host:
      default: 127.0.0.1
      description: Address of the StatsD daemon
    port:
      default: '8126'
      description: Default admin port (`mgmt_port`)
tags:
- name: Configuration
  description: Runtime Configuration Inspection
paths:
  /config:
    get:
      summary: Dump Current Configuration
      description: Return the currently loaded configuration document as a JSON-like object literal — equivalent to inspecting `exampleConfig.js` post-load.
      operationId: dumpConfig
      tags:
      - Configuration
      responses:
        '200':
          description: Loaded Configuration.
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Config'
components:
  schemas:
    Config:
      type: object
      description: Loaded configuration document — mirrors `exampleConfig.js`.
      properties:
        port:
          type: integer
          default: 8125
          description: UDP port to listen for metrics on.
        address:
          type: string
          default: 0.0.0.0
          description: Address to listen on.
        mgmt_port:
          type: integer
          default: 8126
          description: TCP port for the management interface.
        mgmt_address:
          type: string
          default: 0.0.0.0
        flushInterval:
          type: integer
          default: 10000
          description: Milliseconds between backend flushes.
        percentThreshold:
          type: array
          items:
            type: number
          default:
          - 90
          description: Percentiles to compute for timer metrics.
        deleteIdleStats:
          type: boolean
          default: false
        deleteCounters:
          type: boolean
          default: false
        deleteGauges:
          type: boolean
          default: false
        deleteTimers:
          type: boolean
          default: false
        deleteSets:
          type: boolean
          default: false
        backends:
          type: array
          items:
            type: string
          description: NPM module names of backends to load.
          example:
          - ./backends/graphite
        prefixStats:
          type: string
          default: statsd
          description: Prefix applied to the daemon's own self-stats.
        debug:
          type: boolean
          default: false
        dumpMessages:
          type: boolean
          default: false
        healthStatus:
          type: string
          default: up
          enum:
          - up
          - down