Skip to content
This repository has been archived by the owner on May 25, 2022. It is now read-only.

Commit

Permalink
Add prefixes to many examples in documentation (#453)
Browse files Browse the repository at this point in the history
  • Loading branch information
djaglowski authored Mar 24, 2022
1 parent fc93e37 commit 6c3c01e
Show file tree
Hide file tree
Showing 15 changed files with 69 additions and 69 deletions.
8 changes: 4 additions & 4 deletions docs/operators/add.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ Add a string to the body

```yaml
- type: add
field: key2
value: val2
field: body.key2
value: body.val2
```
<table>
Expand Down Expand Up @@ -63,7 +63,7 @@ Add a value to the body using an expression

```yaml
- type: add
field: key2
field: body.key2
value: EXPR(body.key1 + "_suffix")
```
Expand Down Expand Up @@ -105,7 +105,7 @@ Add an object to the body

```yaml
- type: add
field: key2
field: body.key2
value:
nestedkey: nestedvalue
```
Expand Down
10 changes: 5 additions & 5 deletions docs/operators/copy.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Copy a value from the body to resource

```yaml
- type: copy
from: key
from: body.key
to: resource.newkey
```
Expand Down Expand Up @@ -63,7 +63,7 @@ Copy a value from the body to resource
Copy a value from the body to attributes
```yaml
- type: copy
from: key2
from: body.key2
to: attributes.newkey
```
Expand Down Expand Up @@ -109,7 +109,7 @@ Copy a value from attributes to the body
```yaml
- type: copy
from: attributes.key
to: newkey
to: body.newkey
```
<table>
Expand Down Expand Up @@ -156,8 +156,8 @@ Copy a value from attributes to the body
Copy a value within the body
```yaml
- type: copy
from: obj.nested
to: newkey
from: body.obj.nested
to: body.newkey
```
<table>
Expand Down
4 changes: 2 additions & 2 deletions docs/operators/csv_parser.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Configuration:

```yaml
- type: csv_parser
parse_from: message
parse_from: body.message
header: id,severity,message
delimiter: "\t"
```
Expand Down Expand Up @@ -107,7 +107,7 @@ Configuration:
- type: csv_parser
header: 'timestamp_field,severity,message'
timestamp:
parse_from: timestamp_field
parse_from: body.timestamp_field
layout_type: strptime
layout: '%Y-%m-%d'
```
Expand Down
4 changes: 2 additions & 2 deletions docs/operators/flatten.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Flatten an object to the base of the body

```yaml
- type: flatten
field: key1
field: body.key1
```
<table>
Expand Down Expand Up @@ -70,7 +70,7 @@ Flatten an object within another object

```yaml
- type: flatten
field: wrapper.key1
field: body.wrapper.key1
```
<table>
Expand Down
12 changes: 6 additions & 6 deletions docs/operators/json_parser.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The `json_parser` operator parses the string-type field selected by `parse_from`
Configuration:
```yaml
- type: json_parser
parse_from: message
parse_from: body.message
```
<table>
Expand Down Expand Up @@ -63,9 +63,9 @@ Configuration:
Configuration:
```yaml
- type: json_parser
parse_from: message.embedded
parse_to: parsed
preserve_to: message.embedded
parse_from: body.message.embedded
parse_to: body.parsed
preserve_to: body.message.embedded
```
<table>
Expand Down Expand Up @@ -110,9 +110,9 @@ Configuration:
Configuration:
```yaml
- type: json_parser
parse_from: message
parse_from: body.message
timestamp:
parse_from: seconds_since_epoch
parse_from: body.seconds_since_epoch
layout_type: epoch
layout: s
```
Expand Down
16 changes: 8 additions & 8 deletions docs/operators/move.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ The `move` operator moves (or renames) a field from one location to another.
Rename value
```yaml
- type: move
from: key1
to: key3
from: body.key1
to: body.key3
```
<table>
Expand Down Expand Up @@ -61,8 +61,8 @@ Move a value from the body to resource

```yaml
- type: move
from: uuid
to: $resoruce.uuid
from: body.uuid
to: resoruce.uuid
```
<table>
Expand Down Expand Up @@ -103,7 +103,7 @@ Move a value from the body to attributes

```yaml
- type: move
from: ip
from: body.ip
to: attributes.ip
```
Expand Down Expand Up @@ -144,7 +144,7 @@ Move a value from the body to attributes
Replace the body with an individual value nested within the body
```yaml
- type: move
from: log
from: body.log
to: body
```
Expand Down Expand Up @@ -183,7 +183,7 @@ Replace the body with an individual value nested within the body
Remove a layer from the body
```yaml
- type: move
from: wrapper
from: body.wrapper
to: body
```
Expand Down Expand Up @@ -231,7 +231,7 @@ Remove a layer from the body
Merge a layer to the body
```yaml
- type: move
from: object
from: body.object
to: body
```
Expand Down
4 changes: 2 additions & 2 deletions docs/operators/recombine.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Configuration:
- type: regex_parser
regex: '^(?P<timestamp>[^\s]+) (?P<stream>\w+) (?P<logtag>\w) (?P<message>.*)'
- type: recombine
combine_field: message
combine_field: body.message
combine_with: ""
is_last_entry: "body.logtag == 'F'"
overwrite_with: "newest"
Expand Down Expand Up @@ -100,7 +100,7 @@ This can be expressed with the following configuration:

```yaml
- type: recombine
combine_field: message
combine_field: body.message
is_first_entry: body.message matches "^[^\s]"
```
Expand Down
14 changes: 7 additions & 7 deletions docs/operators/regex_parser.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ This operator makes use of [Go regular expression](https://github.com/google/re2
Configuration:
```yaml
- type: regex_parser
parse_from: message
parse_from: body.message
regex: '^Host=(?P<host>[^,]+), Type=(?P<type>.*)$'
```
Expand Down Expand Up @@ -69,10 +69,10 @@ Configuration:
Configuration:
```yaml
- type: regex_parser
parse_from: message.embedded
parse_to: parsed
parse_from: body.message.embedded
parse_to: body.parsed
regex: '^Host=(?P<host>[^,]+), Type=(?P<type>.*)$'
preserve_to: message.embedded
preserve_to: body.message.embedded
```
<table>
Expand Down Expand Up @@ -121,7 +121,7 @@ Configuration:
- type: regex_parser
regex: '^Time=(?P<timestamp_field>\d{4}-\d{2}-\d{2}), Host=(?P<host>[^,]+), Type=(?P<type>.*)$'
timestamp:
parse_from: timestamp_field
parse_from: body.timestamp_field
layout_type: strptime
layout: '%Y-%m-%d'
```
Expand Down Expand Up @@ -161,7 +161,7 @@ Configuration:
```yaml
- type: regex_parser
regex: '^Host=(?<host>)$'
parse_from: message
parse_from: body.message
if: 'body.type == "hostname"'
```
Expand Down Expand Up @@ -228,7 +228,7 @@ Configuration:
```yaml
- type: regex_parser
regex: '^Host=(?<host>)$'
parse_from: message
parse_from: body.message
if: 'body.type == "hostname"'
```
Expand Down
4 changes: 2 additions & 2 deletions docs/operators/remove.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The `remove` operator removes a field from a record.
Remove a value from the body
```yaml
- type: remove
field: key1
field: body.key1
```
<table>
Expand Down Expand Up @@ -57,7 +57,7 @@ Remove a value from the body
Remove an object from the body
```yaml
- type: remove
field: object
field: body.object
```
<table>
Expand Down
8 changes: 4 additions & 4 deletions docs/operators/retain.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ Retain fields in the body
```yaml
- type: retain
fields:
- key1
- key2
- body.key1
- body.key2
```
<table>
Expand Down Expand Up @@ -69,7 +69,7 @@ Retain an object in the body
```yaml
- type: retain
fields:
- object
- body.object
```
<table>
Expand Down Expand Up @@ -216,7 +216,7 @@ Retain fields from all sources
fields:
- resource.key1
- attributes.key3
- key5
- body.key5
```
<table>
Expand Down
12 changes: 6 additions & 6 deletions docs/operators/uri_parser.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ The following fields are returned. Empty fields are not returned.
### Example Configurations


#### Parse the field `message` as absolute URI
#### Parse the field `body.message` as absolute URI

Configuration:
```yaml
- type: uri_parser
parse_from: message
parse_from: body.message
```
<table>
Expand Down Expand Up @@ -90,12 +90,12 @@ Configuration:
</tr>
</table>

#### Parse the field `message` as relative URI
#### Parse the field `body.message` as relative URI

Configuration:
```yaml
- type: uri_parser
parse_from: message
parse_from: body.message
```
<table>
Expand Down Expand Up @@ -133,12 +133,12 @@ Configuration:
</tr>
</table>

#### Parse the field `query` as URI query string
#### Parse the field `body.query` as URI query string

Configuration:
```yaml
- type: uri_parser
parse_from: query
parse_from: body.query
```
<table>
Expand Down
2 changes: 1 addition & 1 deletion docs/types/field.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ If a field does not start with `resource`, `attributes`, or `body`, then `body`
Config:
```yaml
- type: add
field: key3
field: body.key3
value: val3
- type: remove
field: body.key2.nested_key1
Expand Down
Loading

0 comments on commit 6c3c01e

Please sign in to comment.