Skip to content

Commit

Permalink
Add built-in placeholders document
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Hatake <[email protected]>
  • Loading branch information
cosmo0920 committed Nov 29, 2018
1 parent 803821a commit 58b66f4
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,30 @@ Use _mongo_ type in match.

For _connection_string_ parameter, see https://docs.mongodb.com/manual/reference/connection-string/ article for more detail.

===== built-in placeholders

fluent-plugin-mongo support built-in placeholders.
_database_ and _collection_ parameters can handle them.

Here is an example to use built-in placeholders:

<match mongo.**>
@type mongo

database ${tag[0]}

# collection name to insert
collection ${tag[1]}-%Y%m%d

# Other buffer configurations here
<buffer tag, time>
@type memory
timekey 3600
</buffer>
</match>

In more detail, please refer to the officilal document for built-in placeholders: https://docs.fluentd.org/v1.0/articles/buffer-section#placeholders

=== mongo(tag mapped mode)

Tag mapped to MongoDB collection automatically.
Expand Down

0 comments on commit 58b66f4

Please sign in to comment.