Skip to content

Commit 729177d

Browse files
Merge pull request #1884 from fluent/alexakreizinger/sc-136282/update-fluent-bit-docs-pipeline-parsers-regular
2 parents 6e91126 + cd87cd8 commit 729177d

File tree

2 files changed

+14
-22
lines changed

2 files changed

+14
-22
lines changed

pipeline/parsers/regular-expression.md

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,30 @@
1-
# Regular Expression
1+
# Regular expression
22

3-
The **Regex** parser lets you define a custom Ruby regular expression that uses
4-
a named capture feature to define which content belongs to which key name.
3+
The _Regular expression_ parser lets you define a custom Ruby regular expression that uses named capture to define which content belongs to which key name.
54

6-
Use [Tail Multiline](../inputs/tail.md#multiline) when you need to support regexes
7-
across multiple lines from a `tail`. The [Tail](../inputs/tail.md) input plugin
8-
treats each line as a separate entity.
5+
Use [Tail multiline](../inputs/tail.md#multiline) when you need to support regular expressions across multiple lines from a `tail`. The Tail input plugin treats each line as a separate entity.
96

107
{% hint style="warning" %}
118

12-
Security Warning: Onigmo is a backtracking regex engine. When using expensive
13-
regex patterns Onigmo can take a long time to perform pattern matching. Read
14-
["ReDoS"](https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS) on OWASP for additional information.
9+
This parser uses Onigmo, which is a backtracking regular expressions engine. When using complex regular expression patterns, Onigmo can take a long time to perform pattern matching. This can cause a [regular expression denial of service (ReDoS)](https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS).
1510

1611
{% end hint %}
1712

18-
Setting the format to **regex** requires a `regex` configuration key.
13+
Setting the format to regular expressions requires a `regex` configuration key.
1914

20-
## Configuration Parameters
15+
## Configuration parameters
2116

22-
The regex parser supports the following configuration parameters:
17+
The `regex` parser supports the following configuration parameters:
2318

2419
| Key | Description | Default Value |
2520
| --- | ----------- | ------------- |
2621
| `Skip_Empty_Values` | If enabled, the parser ignores empty value of the record. | `True` |
2722

28-
Fluent Bit uses the [Onigmo](https://github.com/k-takata/Onigmo) regular expression
29-
library on Ruby mode.
23+
Fluent Bit uses the [Onigmo](https://github.com/k-takata/Onigmo) regular expression library in Ruby mode.
3024

31-
You can use only alphanumeric characters and underscore in group names. For example,
32-
a group name like `(?<user-name>.*)` causes an error due to the invalid dash (`-`)
33-
character. Use the [Rubular](http://rubular.com/) web editor to test your expressions.
25+
You can use only alphanumeric characters and underscore in group names. For example, a group name like `(?<user-name>.*)` causes an error due to the invalid dash (`-`) character. Use the [Rubular](http://rubular.com/) web editor to test your expressions.
3426

35-
The following parser configuration example provides rules that can be applied to an
36-
Apache HTTP Server log entry:
27+
The following parser configuration example provides rules that can be applied to an Apache HTTP Server log entry:
3728

3829
{% tabs %}
3930
{% tab title="parsers.yaml" %}
@@ -70,8 +61,7 @@ As an example, review the following Apache HTTP Server log entry:
7061
192.168.2.20 - - [29/Jul/2015:10:27:10 -0300] "GET /cgi-bin/try/ HTTP/1.0" 200 3395
7162
```
7263

73-
This log entry doesn't provide a defined structure for Fluent Bit. Enabling the
74-
proper parser can help to make a structured representation of the entry:
64+
This log entry doesn't provide a defined structure for Fluent Bit. Enabling the proper parser can help to make a structured representation of the entry:
7565

7666
```text
7767
[1154104030, {"host"=>"192.168.2.20",
@@ -84,4 +74,4 @@ proper parser can help to make a structured representation of the entry:
8474
"agent"=>""
8575
}
8676
]
87-
```
77+
```

vale-styles/FluentBit/Spelling-exceptions.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ Nginx
120120
NGINX
121121
OAuth
122122
Okta
123+
Onigmo
123124
Oniguruma
124125
OpenTelemetry
125126
Opsgenie
@@ -150,6 +151,7 @@ Rollup
150151
rollups
151152
Rollups
152153
routable
154+
Rubular
153155
runbook
154156
runbooks
155157
Scalyr

0 commit comments

Comments
 (0)