Skip to content

Commit 697ff48

Browse files
authored
Document double asterisk globbing for path on tail input (#571)
* input: tail: path: mention double asterisk globbing Previous versions required the use the tail_ex plugin, newer versions already have this included by default. Signed-off-by: Niko Wenselowski <[email protected]> * Remove extra whitespace Signed-off-by: Niko Wenselowski <[email protected]> --------- Signed-off-by: Niko Wenselowski <[email protected]>
1 parent 14824a0 commit 697ff48

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

input/tail.md

+11-5
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,12 @@ path /path/to/a/*,/path/to/b/c.log
9595

9696
If the date is `20140401`, Fluentd starts to watch the files in `/path/to/2014/04/01` directory. See also `read_from_head` parameter.
9797

98+
Using `**` for path globbing is supported.
99+
100+
```text
101+
path /path/to/**/some.log
102+
```
103+
98104
By default, You should not use `*` with log rotation because it may cause the log duplication. To avoid log duplication, you need to set `follow_inodes true` in the configuration.
99105

100106
If you want to use other glob patterns such as `[]` and `?`, you need to set up `glob_policy extended` as described in the `glob_policy` section.
@@ -423,7 +429,7 @@ Refer to the [Logging](../deployment/logging.md) for more details.
423429

424430
The `in_tail` plugin can assign each log file to a group, based on user defined rules. The `limit` parameter controls the total number of lines collected for a group within a `rate_period` time interval.
425431

426-
Example:
432+
Example:
427433

428434
```text
429435
# group rules -- 1
@@ -456,9 +462,9 @@ Example:
456462
| :--- | :--- | :--- |
457463
| regexp | `/^\/var\/log\/containers\/(?<podname>[a-z0-9]([-a-z0-9]*[a-z0-9])?(\/[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)_(?<namespace>[^_]+)_(?<container>.+)-(?<docker_id>[a-z0-9]{64})\.log$/`| 1.15 |
458464

459-
Specifies the regular expression for extracting metadata (namespace, podname) from log file path. Default value of the pattern regexp extracts information about `namespace`, `podname`, `docker_id`, `container` of the log (K8s specific).
465+
Specifies the regular expression for extracting metadata (namespace, podname) from log file path. Default value of the pattern regexp extracts information about `namespace`, `podname`, `docker_id`, `container` of the log (K8s specific).
460466

461-
You can also add custom named captures in `pattern` for custom grouping of log files. For example,
467+
You can also add custom named captures in `pattern` for custom grouping of log files. For example,
462468
```text
463469
pattern /^\/home\/logs\/(?<file>.+)\.log$/
464470
```
@@ -559,15 +565,15 @@ path C:\\path\\to\\*\\foo.log
559565

560566
If this article is incorrect or outdated, or omits critical information, please [let us know](https://github.com/fluent/fluentd-docs-gitbook/issues?state=open). [Fluentd](http://www.fluentd.org/) is an open-source project under [Cloud Native Computing Foundation \(CNCF\)](https://cncf.io/). All components are available under the Apache 2 License.
561567

562-
### What happens when a file can be assigned to more than one group?
568+
### What happens when a file can be assigned to more than one group?
563569

564570
Example,
565571

566572
```text
567573
<rule> ## Rule1
568574
match {
569575
namespace: /monitoring/
570-
}
576+
}
571577
limit 100
572578
</rule>
573579

0 commit comments

Comments
 (0)