Skip to content
Merged
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
86 changes: 43 additions & 43 deletions pipeline/inputs/forward.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,40 +31,23 @@ To receive Forward messages, you can run the plugin from the command line or thr

From the command line you can let Fluent Bit listen for Forward messages with the following options:

```bash
fluent-bit -i forward -o stdout
```shell
$ fluent-bit -i forward -o stdout
```

By default, the service listens on all interfaces (`0.0.0.0`) through TCP port `24224`. You can change this by passing parameters to the command:

```bash
fluent-bit -i forward -p listen="192.168.3.2" -p port=9090 -o stdout
```shell
$ fluent-bit -i forward -p listen="192.168.3.2" -p port=9090 -o stdout
```

In the example, the Forward messages arrive only through network interface `192.168.3.2` address and TCP Port `9090`.

### Configuration file

In your main configuration file append the following `Input` and `Output` sections:
In your main configuration file append the following:

{% tabs %}
{% tab title="fluent-bit.conf" %}

```python
[INPUT]
Name forward
Listen 0.0.0.0
Port 24224
Buffer_Chunk_Size 1M
Buffer_Max_Size 6M

[OUTPUT]
Name stdout
Match *
```

{% endtab %}

{% tab title="fluent-bit.yaml" %}

```yaml
Expand All @@ -75,43 +58,40 @@ pipeline:
port: 24224
buffer_chunk_size: 1M
buffer_max_size: 6M

outputs:
- name: stdout
match: '*'
```

{% endtab %}
{% endtabs %}

## Fluent Bit and Secure Forward Setup

In Fluent Bit v3 or later, `in_forward` can handle secure forward protocol.

For using user-password authentication, specify `security.users` at least an one-pair.
For using shared key, specify `shared_key` in both of forward output and forward input.
`self_hostname` isn't able to specify with the same hostname between fluent servers and clients.

{% tabs %}
{% tab title="fluent-bit-secure-forward.conf" %}
{% tab title="fluent-bit.conf" %}

```python
```text
[INPUT]
Name forward
Listen 0.0.0.0
Port 24224
Buffer_Chunk_Size 1M
Buffer_Max_Size 6M
Security.Users fluentbit changeme
Shared_Key secret
Self_Hostname flb.server.local

[OUTPUT]
Name stdout
Match *
```

{% endtab %}
{% endtabs %}

## Fluent Bit and Secure Forward Setup

In Fluent Bit v3 or later, `in_forward` can handle secure forward protocol.

For using user-password authentication, specify `security.users` at least an one-pair.
For using shared key, specify `shared_key` in both of forward output and forward input.
`self_hostname` isn't able to specify with the same hostname between fluent servers and clients.

{% tabs %}
{% tab title="fluent-bit-secure-forward.yaml" %}

```yaml
Expand All @@ -125,26 +105,46 @@ pipeline:
security.users: fluentbit changeme
shared_key: secret
self_hostname: flb.server.local

outputs:
- name: stdout
match: '*'
```

{% endtab %}
{% tab title="fluent-bit-secure-forward.conf" %}

```text
[INPUT]
Name forward
Listen 0.0.0.0
Port 24224
Buffer_Chunk_Size 1M
Buffer_Max_Size 6M
Security.Users fluentbit changeme
Shared_Key secret
Self_Hostname flb.server.local

[OUTPUT]
Name stdout
Match *
```

{% endtab %}
{% endtabs %}

## Testing

After Fluent Bit is running, you can send some messages using the `fluent-cat` tool, provided by [Fluentd](http://www.fluentd.org):

```bash
echo '{"key 1": 123456789, "key 2": "abcdefg"}' | fluent-cat my_tag
```shell
$ echo '{"key 1": 123456789, "key 2": "abcdefg"}' | fluent-cat my_tag
```

When you run the plugin with the following command:

```bash
bin/fluent-bit -i forward -o stdout
```shell
$ fluent-bit -i forward -o stdout
```

In [Fluent Bit](http://fluentbit.io) you should see the following output:
Expand All @@ -156,4 +156,4 @@ Copyright (C) Treasure Data
[2016/10/07 21:49:40] [ info] [engine] started
[2016/10/07 21:49:40] [ info] [in_fw] binding 0.0.0.0:24224
[0] my_tag: [1475898594, {"key 1"=>123456789, "key 2"=>"abcdefg"}]
```
```