Skip to content

Commit

Permalink
Add notes for built-in placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmo0920 committed Oct 2, 2019
1 parent 09f1acc commit 5a52502
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,28 @@ Name of the stream to put data.
As of Fluentd v1, we can handle built-in placeholders.
Now, this parameter is supported built-in placeholders.

**NOTE:**
Built-in placeholders request to include target key information with buffer attributes.

e.g.)

If you specify the following `stream_name` configuration with built-in placeholder:

```aconf
stream_name "${$.kubernetes.annotations.kinesis_stream}"
```

You ought to specify the corresponding attributes in buffer directive:

```aconf
# $.kubernetes.annotations.kinesis_stream is needed to set in buffer attributes
<buffer $.kubernetes.annotations.kinesis_stream>
# ...
</buffer>
```

In more detail, please refer [the Placeholders section in the official Fluentd](https://docs.fluentd.org/configuration/buffer-section#placeholders).

### partition_key
A key to extract partition key from JSON object. Default `nil`, which means partition key will be generated randomly.

Expand All @@ -370,6 +392,28 @@ Name of the stream to put data.
As of Fluentd v1, we can handle built-in placeholders.
Now, this parameter is supported built-in placeholders.

**NOTE:**
Built-in placeholders request to include target key information with buffer attributes.

e.g.)

If you specify the following `stream_name` configuration with built-in placeholder:

```aconf
stream_name "${$.kubernetes.annotations.kinesis_stream_aggregated}"
```

You ought to specify the corresponding attributes in buffer directive:

```aconf
# $.kubernetes.annotations.kinesis_stream_aggregated is needed to set in buffer attributes
<buffer $.kubernetes.annotations.kinesis_stream_aggregated>
# ...
</buffer>
```
In more detail, please refer [the Placeholders section in the official Fluentd](https://docs.fluentd.org/configuration/buffer-section#placeholders).


### fixed_partition_key
A value of fixed partition key. Default `nil`, which means partition key will be generated randomly.

Expand Down

0 comments on commit 5a52502

Please sign in to comment.