Skip to content

Commit 58b66f4

Browse files
committed
Add built-in placeholders document
Signed-off-by: Hiroshi Hatake <hatake@clear-code.com>
1 parent 803821a commit 58b66f4

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.rdoc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,30 @@ Use _mongo_ type in match.
5858

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

61+
===== built-in placeholders
62+
63+
fluent-plugin-mongo support built-in placeholders.
64+
_database_ and _collection_ parameters can handle them.
65+
66+
Here is an example to use built-in placeholders:
67+
68+
<match mongo.**>
69+
@type mongo
70+
71+
database ${tag[0]}
72+
73+
# collection name to insert
74+
collection ${tag[1]}-%Y%m%d
75+
76+
# Other buffer configurations here
77+
<buffer tag, time>
78+
@type memory
79+
timekey 3600
80+
</buffer>
81+
</match>
82+
83+
In more detail, please refer to the officilal document for built-in placeholders: https://docs.fluentd.org/v1.0/articles/buffer-section#placeholders
84+
6185
=== mongo(tag mapped mode)
6286

6387
Tag mapped to MongoDB collection automatically.

0 commit comments

Comments
 (0)