StatsD

The statsd input plugin allows you to receive metrics via StatsD protocol.

Content:

Configuration Parameters

The plugin supports the following configuration parameters:

Key Description Default
Listen Listener network interface. 0.0.0.0
Port UDP port where listening for connections 8125

Configuration Examples

Here is a configuration example.

  1. [INPUT]
  2. Name statsd
  3. Listen 0.0.0.0
  4. Port 8125
  5. [OUTPUT]
  6. Name stdout
  7. Match *

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

  1. echo "click:10|c|@0.1" | nc -q0 -u 127.0.0.1 8125
  2. echo "active:99|g" | nc -q0 -u 127.0.0.1 8125

Fluent Bit will produce the following records:

  1. [0] statsd.0: [1574905088.971380537, {"type"=>"counter", "bucket"=>"click", "value"=>10.000000, "sample_rate"=>0.100000}]
  2. [0] statsd.0: [1574905141.863344517, {"type"=>"gauge", "bucket"=>"active", "value"=>99.000000, "incremental"=>0}]