Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

input: statsd: add documentation for the new "in_statsd" plugin #239

Merged
merged 1 commit into from
Jan 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
* [Random](input/random.md)
* [Serial Interface](input/serial.md)
* [Standard Input](input/stdin.md)
* [StatsD Input](input/statsd.md)
* [Syslog](input/syslog.md)
* [Systemd](input/systemd.md)
* [Tail](input/tail.md)
Expand Down
1 change: 1 addition & 0 deletions input/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ The _input plugins_ defines the source from where [Fluent Bit](http://fluentbit.
| [random](random.md) | Random | Generate Random samples. |
| [serial](serial.md) | Serial Interface | read data information from the serial interface. |
| [stdin](stdin.md) | Standard Input | read data from the standard input. |
| [statsd](statsd.md) | StatsD | receive metrics in StatsD protocol. |
| [syslog](syslog.md) | Syslog | read syslog messages from a Unix socket. |
| [systemd](systemd.md) | Systemd | read logs from Systemd/Journald. |
| [tail](tail.md) | Tail | Tail log files |
Expand Down
42 changes: 42 additions & 0 deletions input/statsd.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# StatsD

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

Content:

* [Configuration Parameters](statsd.md#config)
* [Configuration Examples](statsd.md#config_example)

## Configuration Parameters {#config}

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 {#config_example}

Here is a configuration example.

```python
[INPUT]
Name statsd
Listen 0.0.0.0
Port 8125

[OUTPUT]
Name stdout
Match *
```

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

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

Fluent Bit will produce the following records:

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