-
Notifications
You must be signed in to change notification settings - Fork 332
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1594 from csabatuz-chess/feature/filter-useragent
feat: add support for useragent Fluent filter
- Loading branch information
Showing
14 changed files
with
377 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
--- | ||
title: User Agent | ||
weight: 200 | ||
generated_file: true | ||
--- | ||
|
||
# Fluentd UserAgent filter | ||
## Overview | ||
Fluentd Filter plugin to parse user-agent | ||
More information at https://github.com/bungoume/fluent-plugin-ua-parser | ||
|
||
## Configuration | ||
## UserAgent | ||
|
||
### delete_key (bool, optional) {#useragent-delete_key} | ||
|
||
Delete input key | ||
|
||
Default: false | ||
|
||
### flatten (bool, optional) {#useragent-flatten} | ||
|
||
Join hashed data by '_' | ||
|
||
Default: false | ||
|
||
### key_name (string, optional) {#useragent-key_name} | ||
|
||
Target key name | ||
|
||
Default: user_agent | ||
|
||
### out_key (string, optional) {#useragent-out_key} | ||
|
||
Output prefix key name | ||
|
||
Default: ua | ||
|
||
|
||
## Example `UserAgent` filter configurations | ||
|
||
{{< highlight yaml >}} | ||
apiVersion: logging.banzaicloud.io/v1beta1 | ||
kind: Flow | ||
metadata: | ||
name: demo-flow | ||
spec: | ||
filters: | ||
- useragent: | ||
key_name: my_agent | ||
delete_key: true | ||
out_key: ua_fields | ||
flatten: true | ||
selectors: {} | ||
localOutputRefs: | ||
- demo-output | ||
{{</ highlight >}} | ||
|
||
## Fluentd Config Result | ||
{{< highlight xml >}} | ||
<filter **> | ||
@type ua_parser | ||
@id test_useragent | ||
key_name my_agent | ||
delete_key true | ||
out_key ua_fields | ||
flatten true | ||
</filter> | ||
{{</ highlight >}} | ||
|
||
|
||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.