Skip to content

Commit f5efc15

Browse files
authored
Merge pull request #1825 from fluent/lynettemiles/sc-136203/update-fluent-bit-docs-pipeline-inputs-statsd
2 parents 8c843cf + a5289d7 commit f5efc15

File tree

1 file changed

+50
-45
lines changed

1 file changed

+50
-45
lines changed

pipeline/inputs/statsd.md

Lines changed: 50 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,48 @@
11
# StatsD
22

3-
The **statsd** input plugin allows you to receive metrics via StatsD protocol.
3+
The _StatsD_ input plugin lets you receive metrics using the StatsD protocol.
44

5-
Content:
6-
7-
* [Configuration Parameters](statsd.md#config)
8-
* [Configuration Examples](statsd.md#config_example)
9-
10-
## Configuration Parameters <a id="config"></a>
5+
## Configuration parameters
116

127
The plugin supports the following configuration parameters:
138

149
| Key | Description | Default |
1510
| :--- | :--- | :--- |
16-
| Listen | Listener network interface. | 0.0.0.0 |
17-
| Port | UDP port where listening for connections | 8125 |
18-
| Threaded | Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). | `false` |
19-
| Metrics | Ingested record will be marked as a metric record rather than a log record. | `off` |
20-
21-
Note: When enabling `Metrics On`, we will also handle metrics from the DogStatsD protocol and the internal record in Fluent Bit will be handled as a metric type for downstream processing.
22-
[The full format of DogStatsD of metrics](https://docs.datadoghq.com/developers/dogstatsd/datagram_shell/?tab=metrics#the-dogstatsd-protocol) is not supported.
23-
Including key-value format of tags as below is supported:
11+
| `Listen` | Listener network interface. | `0.0.0.0` |
12+
| `Port` | UDP port that listens for connections. | `8125` |
13+
| `Threaded` | Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). | `false` |
14+
| `Metrics` | Ingested record will be marked as a metric record rather than a log record. | `off` |
15+
16+
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.
17+
18+
[The full format of DogStatsD of metrics](https://docs.datadoghq.com/developers/dogstatsd/datagram_shell/?tab=metrics#the-dogstatsd-protocol) isn't supported.
19+
20+
Including key-value format of tags is supported:
2421
`<METRIC_NAME>:<VALUE>|<TYPE>|@<SAMPLE_RATE>|#<TAG_KEY_1>:<TAG_VALUE_1>`
25-
[Events](https://docs.datadoghq.com/developers/dogstatsd/datagram_shell/?tab=events#the-dogstatsd-protocol) and [ServiceChecks](https://docs.datadoghq.com/developers/dogstatsd/datagram_shell/?tab=servicechecks#the-dogstatsd-protocol) formats are not supported yet with `Metrics On`.
2622

27-
## Configuration Examples <a id="config_example"></a>
23+
[Events](https://docs.datadoghq.com/developers/dogstatsd/datagram_shell/?tab=events#the-dogstatsd-protocol) and [ServiceChecks](https://docs.datadoghq.com/developers/dogstatsd/datagram_shell/?tab=servicechecks#the-dogstatsd-protocol) formats aren't supported with `Metrics On`.
24+
25+
## Configuration example
2826

2927
Here is a configuration example.
3028

3129
{% tabs %}
30+
{% tab title="fluent-bit.yaml" %}
31+
32+
```yaml
33+
pipeline:
34+
inputs:
35+
- name: statsd
36+
listen: 0.0.0.0
37+
port: 8125
38+
outputs:
39+
- name: stdout
40+
match: '*'
41+
```
42+
43+
{% endtab %}
3244
{% tab title="fluent-bit.conf" %}
45+
3346
```python
3447
[INPUT]
3548
Name statsd
@@ -40,19 +53,7 @@ Here is a configuration example.
4053
Name stdout
4154
Match *
4255
```
43-
{% endtab %}
4456

45-
{% tab title="fluent-bit.yaml" %}
46-
```yaml
47-
pipeline:
48-
inputs:
49-
- name: statsd
50-
listen: 0.0.0.0
51-
port: 8125
52-
outputs:
53-
- name: stdout
54-
match: '*'
55-
```
5657
{% endtab %}
5758
{% endtabs %}
5859

@@ -70,26 +71,14 @@ Fluent Bit will produce the following records:
7071
[0] statsd.0: [1574905141.863344517, {"type"=>"gauge", "bucket"=>"active", "value"=>99.000000, "incremental"=>0}]
7172
```
7273

73-
## Metrics Setup
74+
## Metrics setup
7475

7576
Here is a configuration example for metrics setup.
7677

7778
{% tabs %}
78-
{% tab title="fluent-bit.conf" %}
79-
```python
80-
[INPUT]
81-
Name statsd
82-
Listen 0.0.0.0
83-
Port 8125
84-
Metrics On
85-
86-
[OUTPUT]
87-
Name stdout
88-
Match *
89-
```
90-
{% endtab %}
9179

9280
{% tab title="fluent-bit.yaml" %}
81+
9382
```yaml
9483
pipeline:
9584
inputs:
@@ -101,6 +90,22 @@ pipeline:
10190
- name: stdout
10291
match: '*'
10392
```
93+
94+
{% endtab %}
95+
{% tab title="fluent-bit.conf" %}
96+
97+
```python
98+
[INPUT]
99+
Name statsd
100+
Listen 0.0.0.0
101+
Port 8125
102+
Metrics On
103+
104+
[OUTPUT]
105+
Name stdout
106+
Match *
107+
```
108+
104109
{% endtab %}
105110
{% endtabs %}
106111

@@ -112,9 +117,9 @@ echo "active:+99|g|@0.01" | nc -q0 -u 127.0.0.1 8125
112117
echo "inactive:29|g|@0.0125|#hi:from_fluent-bit" | nc -q0 -u 127.0.0.1 8125
113118
```
114119

115-
Fluent Bit will procude the following metrics events:
120+
Fluent Bit will produce the following metrics events:
116121

117-
```
122+
```text
118123
2025-01-09T11:40:26.562424694Z click{incremental="true",hello="tag"} = 1000
119124
2025-01-09T11:40:28.591477424Z active{incremental="true"} = 9900
120125
2025-01-09T11:40:31.593118033Z inactive{hi="from_fluent-bit"} = 2320

0 commit comments

Comments
 (0)