Skip to content

Commit 7049e9e

Browse files
committed
Merge branch 'master' of github.com:fluent/fluent-bit-docs
2 parents 2c2ca5f + 67ac395 commit 7049e9e

File tree

18 files changed

+202
-29
lines changed

18 files changed

+202
-29
lines changed

SUMMARY.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
* [Collectd](input/collectd.md)
4949
* [CPU Usage](input/cpu.md)
5050
* [Disk Usage](input/disk.md)
51+
* [Docker](input/docker.md)
5152
* [Dummy](input/dummy.md)
5253
* [Exec](input/exec.md)
5354
* [Forward](input/forward.md)
@@ -61,6 +62,7 @@
6162
* [Random](input/random.md)
6263
* [Serial Interface](input/serial.md)
6364
* [Standard Input](input/stdin.md)
65+
* [StatsD Input](input/statsd.md)
6466
* [Syslog](input/syslog.md)
6567
* [Systemd](input/systemd.md)
6668
* [Tail](input/tail.md)
@@ -74,6 +76,7 @@
7476
* [Logfmt Parser](parser/logfmt.md)
7577
* [Decoders](parser/decoder.md)
7678
* [Filter Plugins](filter/README.md)
79+
* [AWS](filter/aws.md)
7780
* [Grep](filter/grep.md)
7881
* [Kubernetes](filter/kubernetes.md)
7982
* [Lua](filter/lua.md)

configuration/variables.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# Configuration Variables
22

3-
Fluent Bit support the usage of environment variables in any value associated to a key when using a configuration file.
3+
Fluent Bit supports the usage of environment variables in any value associated to a key when using a configuration file.
44

55
The variables are case sensitive and can be used in the following format:
66

77
```text
88
${MY_VARIABLE}
99
```
1010

11-
When Fluent Bit starts, the configuration reader will detect any request for ${MY\_VARIABLE} and will try to resolve it value.
11+
When Fluent Bit starts, the configuration reader will detect any request for `${MY_VARIABLE}` and will try to resolve its value.
1212

1313
## Example
1414

15-
Create the following configuration file \(_fluent-bit.conf_\):
15+
Create the following configuration file (`fluent-bit.conf`):
1616

1717
```text
1818
[SERVICE]
@@ -35,7 +35,7 @@ Open a terminal and set the environment variable:
3535
$ export MY_OUTPUT=stdout
3636
```
3737

38-
> The above command set the 'stdout' value to the variable MY\_OUTPUT.
38+
> The above command set the 'stdout' value to the variable `MY_OUTPUT`.
3939
4040
Run Fluent Bit with the recently created configuration file:
4141

filter/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ The _filter plugins_ allows to **alter** the incoming data generated by the _inp
44

55
| name | title | description |
66
| :--- | :--- | :--- |
7+
| [aws](aws.md) | AWS | Enrich logs with AWS Metadata. |
78
| [grep](grep.md) | Grep | Match or exclude specific records by patterns. |
89
| [kubernetes](kubernetes.md) | Kubernetes | Enrich logs with Kubernetes Metadata. |
910
| [lua](lua.md) | Lua | Filter records using Lua Scripts. |
@@ -15,4 +16,3 @@ The _filter plugins_ allows to **alter** the incoming data generated by the _inp
1516
| [modify](modify.md) | Modify | Modifications to record. |
1617

1718
In order to let a Filter be applied over some data, the **Match** rule must exists and it must match the Tag for the incoming data.
18-

filter/aws.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# AWS
2+
3+
The _AWS Filter_ Enriches logs with AWS Metadata. Currently the plugin adds the EC2 instance ID and availability zone to log records. To use this plugin, you must be running in EC2 and have the [instance metadata service enabled](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html).
4+
5+
## Configuration Parameters
6+
7+
The plugin supports the following configuration parameters:
8+
9+
| Key | Value Format | Description |
10+
| :--- | :--- | :--- |
11+
| imds_version | VERSION | Specify which version of the instance metadata service to use. Valid values are 'v1' or 'v2'; 'v2' is the default. |
12+
13+
Note: *If you run Fluent Bit in a container, you may have to use instance metadata v1.* The plugin behaves the same regardless of which version is used.
14+
15+
## Usage
16+
17+
### Command Line
18+
19+
```
20+
$ bin/fluent-bit -i dummy -F aws -m '*' -o stdout
21+
22+
[2020/01/17 07:57:17] [ info] [engine] started (pid=32744)
23+
[0] dummy.0: [1579247838.000171227, {"message"=>"dummy", "az"=>"us-west-2b", "ec2_instance_id"=>"i-06bc83dbc2ac2fdf8"}]
24+
[1] dummy.0: [1579247839.000125097, {"message"=>"dummy", "az"=>"us-west-2b", "ec2_instance_id"=>"i-06bc87dbc2ac3fdf8"}]
25+
```
26+
27+
### Configuration File
28+
29+
```
30+
[INPUT]
31+
Name dummy
32+
Tag dummy
33+
34+
[FILTER]
35+
Name aws
36+
Match *
37+
imds_version v1
38+
39+
[OUTPUT]
40+
Name stdout
41+
Match *
42+
```

input/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ The _input plugins_ defines the source from where [Fluent Bit](http://fluentbit.
77
| [collectd](collectd.md) | Collectd | Listen for UDP packets from Collectd. |
88
| [cpu](cpu.md) | CPU Usage | measure total CPU usage of the system. |
99
| [disk](disk.md) | Disk Usage | measure Disk I/Os. |
10+
| [docker](docker.md) | Docker | collect Docker container metrics. |
1011
| [dummy](dummy.md) | Dummy | generate dummy event. |
1112
| [exec](exec.md) | Exec | executes external program and collects event logs. |
1213
| [forward](forward.md) | Forward | Fluentd forward protocol. |
@@ -20,6 +21,7 @@ The _input plugins_ defines the source from where [Fluent Bit](http://fluentbit.
2021
| [random](random.md) | Random | Generate Random samples. |
2122
| [serial](serial.md) | Serial Interface | read data information from the serial interface. |
2223
| [stdin](stdin.md) | Standard Input | read data from the standard input. |
24+
| [statsd](statsd.md) | StatsD | receive metrics in StatsD protocol. |
2325
| [syslog](syslog.md) | Syslog | read syslog messages from a Unix socket. |
2426
| [systemd](systemd.md) | Systemd | read logs from Systemd/Journald. |
2527
| [tail](tail.md) | Tail | Tail log files |

input/collectd.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ The **collectd** input plugin allows you to receive datagrams from collectd.
55
Content:
66

77
* [Configuration Parameters](collectd.md#config)
8-
* [Configuration Parameters](collectd.md#config_example)
8+
* [Configuration Examples](collectd.md#config_example)
99

1010
## Configuration Parameters {#config}
1111

1212
The plugin supports the following configuration parameters:
1313

1414
| Key | Description | Default |
1515
| :------- | :------------------------------ | :--------------------------- |
16-
| Address | Set the address to listen to | 0.0.0.0 |
16+
| Listen | Set the address to listen to | 0.0.0.0 |
1717
| Port | Set the port to listen to | 25826 |
1818
| TypesDB | Set the data specification file | /usr/share/collectd/types.db |
1919

@@ -24,7 +24,7 @@ Here is a basic configuration example.
2424
```python
2525
[INPUT]
2626
Name collectd
27-
Address 0.0.0.0
27+
Listen 0.0.0.0
2828
Port 25826
2929
TypesDB /usr/share/collectd/types.db,/etc/collectd/custom.db
3030

input/docker.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Docker
2+
3+
The **docker** input plugin allows you to collect Docker container metrics
4+
like memory usage and CPU consumption.
5+
6+
Content:
7+
8+
* [Configuration Parameters](docker.md#config)
9+
* [Configuration Parameters](docker.md#config_example)
10+
11+
## Configuration Parameters {#config}
12+
13+
The plugin supports the following configuration parameters:
14+
15+
| Key | Description | Default |
16+
| :------------ | :---------------------------------------------- | :--------|
17+
| Interval\_Sec | Polling interval in seconds | 1 |
18+
| Include | A space-separated list of containers to include | |
19+
| Exclude | A space-separated list of containers to exclude | |
20+
21+
If you set neither `Include` nor `Exclude`, the plugin will try to get
22+
metrics from _all_ the running containers.
23+
24+
## Configuration Examples {#config_example}
25+
26+
Here is an example configuration that collects metrics from two docker
27+
instances (`6bab19c3a0f9` and `14159be4ca2c`).
28+
29+
```python
30+
[INPUT]
31+
Name docker
32+
Include 6bab19c3a0f9 14159be4ca2c
33+
34+
[OUTPUT]
35+
Name stdout
36+
Match *
37+
```
38+
39+
This configuration will produce records like below.
40+
41+
```
42+
[1] docker.0: [1571994772.00555745, {"id"=>"6bab19c3a0f9", "name"=>"postgresql", "cpu_used"=>172102435, "mem_used"=>5693400, "mem_limit"=>4294963200}]
43+
```

input/exec.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ The plugin supports the following configuration parameters:
1212
| Parser | Specify the name of a parser to interpret the entry as a structured message. |
1313
| Interval\_Sec | Polling interval \(seconds\). |
1414
| Interval\_NSec | Polling interval \(nanosecond\). |
15+
| Buf\_Size | Size of the buffer (check [unit sizes](https://docs.fluentbit.io/manual/configuration/unit_sizes) for allowed values) |
1516

1617
## Getting Started
1718

@@ -47,6 +48,7 @@ In your main configuration file append the following _Input_ & _Output_ sections
4748
Command ls /var/log
4849
Interval_Sec 1
4950
Interval_NSec 0
51+
Buf_Size 8mb
5052

5153
[OUTPUT]
5254
Name stdout

input/statsd.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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+
$ echo "click:10|c|@0.1" | nc -q0 -u 127.0.0.1 8125
37+
$ echo "active:99|g" | nc -q0 -u 127.0.0.1 8125
38+
39+
Fluent Bit will produce the following records:
40+
41+
[0] statsd.0: [1574905088.971380537, {"type"=>"counter", "bucket"=>"click", "value"=>10.000000, "sample_rate"=>0.100000}]
42+
[0] statsd.0: [1574905141.863344517, {"type"=>"gauge", "bucket"=>"active", "value"=>99.000000, "incremental"=>0}]

input/syslog.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ The plugin supports the following configuration parameters:
1414
| Path | If _Mode_ is set to _unix\_tcp_ or _unix\_udp_, set the absolute path to the Unix socket file. | |
1515
| Unix_Perm | If _Mode_ is set to _unix\_tcp_ or _unix\_udp_, set the permission of the Unix socket file. | 0644 |
1616
| Parser | Specify an alternative parser for the message. By default, the plugin uses the parser _syslog-rfc3164_. If your syslog messages have fractional seconds set this Parser value to _syslog-rfc5424_ instead. | |
17-
| Buffer\_Chunk\_Size | By default the buffer to store the incoming Syslog messages, do not allocate the maximum memory allowed, instead it allocate memory when is required. The rounds of allocations are set by _Buffer\_Chunk\_Size_ in KB. If not set, _Buffer\_Chunk\_Size_ is equal to 32 \(32KB\). Read considerations below when using _udp_ or _unix\_udp_ mode. | |
18-
| Buffer\_Max_Size | Specify the maximum buffer size in KB to receive a Syslog message. If not set, the default size will be the value of _Buffer\_Chunk\_Size_. | |
17+
| Buffer\_Chunk\_Size | By default the buffer to store the incoming Syslog messages, do not allocate the maximum memory allowed, instead it allocate memory when is required. The rounds of allocations are set by _Buffer\_Chunk\_Size_. If not set, _Buffer\_Chunk\_Size_ is equal to 32000 bytes \(32KB\). Read considerations below when using _udp_ or _unix\_udp_ mode. | |
18+
| Buffer\_Max_Size | Specify the maximum buffer size to receive a Syslog message. If not set, the default size will be the value of _Buffer\_Chunk\_Size_. | |
1919

2020
### Considerations
2121

@@ -50,8 +50,8 @@ In your main configuration file append the following _Input_ & _Output_ sections
5050
[INPUT]
5151
Name syslog
5252
Path /tmp/in_syslog
53-
Buffer_Chunk_Size 32
54-
Buffer_Max_Size 64
53+
Buffer_Chunk_Size 32000
54+
Buffer_Max_Size 64000
5555

5656
[OUTPUT]
5757
Name stdout

0 commit comments

Comments
 (0)