Skip to content

Commit a31c91d

Browse files
committed
input: add missing statsd
Signed-off-by: Eduardo Silva <[email protected]>
1 parent 3e04322 commit a31c91d

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
* [Random](pipeline/inputs/random.md)
8888
* [Serial Interface](pipeline/inputs/serial-interface.md)
8989
* [Standard Input](pipeline/inputs/standard-input.md)
90+
* [StatsD](pipeline/inputs/statsd.md)
9091
* [Syslog](pipeline/inputs/syslog.md)
9192
* [Systemd](pipeline/inputs/systemd.md)
9293
* [Tail](pipeline/inputs/tail.md)

pipeline/inputs/statsd.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# StatsD
2+
3+
The **statsd** input plugin allows you to receive metrics via StatsD protocol.
4+
5+
Content:
6+
7+
* [Configuration Parameters](statsd.md#config)
8+
* [Configuration Examples](statsd.md#config_example)
9+
10+
## Configuration Parameters {#config}
11+
12+
The plugin supports the following configuration parameters:
13+
14+
| Key | Description | Default |
15+
| :------- | :--------------------------------------- | :------ |
16+
| Listen | Listener network interface. | 0.0.0.0 |
17+
| Port | UDP port where listening for connections | 8125 |
18+
19+
## Configuration Examples {#config_example}
20+
21+
Here is a configuration example.
22+
23+
```python
24+
[INPUT]
25+
Name statsd
26+
Listen 0.0.0.0
27+
Port 8125
28+
29+
[OUTPUT]
30+
Name stdout
31+
Match *
32+
```
33+
34+
Now you can input metrics through the UDP port as follows:
35+
36+
```bash
37+
echo "click:10|c|@0.1" | nc -q0 -u 127.0.0.1 8125
38+
echo "active:99|g" | nc -q0 -u 127.0.0.1 8125
39+
```
40+
41+
Fluent Bit will produce the following records:
42+
43+
[0] statsd.0: [1574905088.971380537, {"type"=>"counter", "bucket"=>"click", "value"=>10.000000, "sample_rate"=>0.100000}]
44+
[0] statsd.0: [1574905141.863344517, {"type"=>"gauge", "bucket"=>"active", "value"=>99.000000, "incremental"=>0}]

0 commit comments

Comments
 (0)