StatsD

The StatsD input plugin lets you receive metrics using the StatsD protocol.

Configuration parameters

The plugin supports the following configuration parameters:

Key
Description
Default

listen

Specify the network interface to bind.

0.0.0.0

metrics

Ingest as metric events rather than log events.

off

port

Specify the UDP port to listen for incoming connections.

8125

threaded

Indicates whether to run this input in its own thread.

false

When enabling Metrics On, Fluent Bit will also handle metrics from the DogStatsD protocol. The internal record in Fluent Bit will be handled as a metric type for downstream processing.

The full format of DogStatsD of metricsarrow-up-right isn't supported.

Including key-value format of tags is supported: <METRIC_NAME>:<VALUE>|<TYPE>|@<SAMPLE_RATE>|#<TAG_KEY_1>:<TAG_VALUE_1>

Eventsarrow-up-right and ServiceChecksarrow-up-right formats aren't supported with Metrics On.

Configuration example

Here is a configuration example.

pipeline:
  inputs:
    - name: statsd
      listen: 0.0.0.0
      port: 8125
      
  outputs:
    - name: stdout
      match: '*'

Now you can input metrics through the UDP port as follows:

Fluent Bit will produce the following records:

Metrics setup

Here is a configuration example for metrics setup.

Now you can input metrics as metrics type of events through the UDP port as follows:

Fluent Bit will produce the following metrics events:

Last updated

Was this helpful?