statsd sink

Streams `metric` events to StatsD metrics service.

The statsd sink is in beta. Please see the current enhancements and bugs for known issues. We kindly ask that you add any missing issues as it will help shape the roadmap of this component.

The statsd sink streams metric events to StatsD metrics service.

Config File

vector.toml (simple)
vector.toml (advanced)
[sinks.my_sink_id]
type = "statsd" # must be: "statsd"
inputs = ["my-source-id"]
namespace = "service"
# For a complete list of options see the "advanced" tab above.

Options

Key

Type

Description

REQUIRED

type

string

The component type required must be: "statsd"

inputs

[string]

A list of upstream source or transform IDs. See Config Composition for more info. required example: ["my-source-id"]

namespace

string

A prefix that will be added to all metric names. required example: "service"

OPTIONAL

address

string

The UDP socket address to send stats to. default: "127.0.0.1:8125"

healthcheck

bool

Enables/disables the sink healthcheck upon start. default: true

Examples

The statsd sink batches metric up to the batch_size or batch_timeout options. When flushed, metrics will be written in Multi-metric format. For example:

gorets:1|c\nglork:320|ms\ngaugor:333|g\nuniques:765|s

How It Works

Delivery Guarantee

Due to the nature of this component, it offers a best effort delivery guarantee.

Environment Variables

Environment variables are supported through all of Vector's configuration. Simply add ${MY_ENV_VAR} in your Vector configuration file and the variable will be replaced before being evaluated.

You can learn more in the Environment Variables section.

Streaming

The statsd sink streams data on a real-time event-by-event basis. It does not batch data.

Troubleshooting

The best place to start with troubleshooting is to check the Vector logs. This is typically located at /var/log/vector.log, then proceed to follow the Troubleshooting Guide.

If the Troubleshooting Guide does not resolve your issue, please:

  1. If encountered a bug, please file a bug report.

  2. If encountered a missing feature, please file a feature request.

  3. If you need help, join our chat/forum community. You can post a question and search previous questions.

Resources