Skip to content

Commit

Permalink
[1.x] Clarify that file extension should exclude the dot. (#1016) (#1020
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Mathieu Martin authored Oct 8, 2020
1 parent 1dc6240 commit 501d404
Show file tree
Hide file tree
Showing 12 changed files with 43 additions and 15 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ All notable changes to this project will be documented in this file based on the
#### Bugfixes

* The `protocol` allowed value under `event.type` should not have the `expected_event_types` defined. #964
* Clarify the definition of `file.extension` (no dots). #1016

#### Added

Expand Down
4 changes: 3 additions & 1 deletion code/go/ecs/file.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion docs/field-details.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2109,7 +2109,9 @@ example: `C`
// ===============================================================

| file.extension
| File extension.
| File extension, excluding the leading dot.

Note that when the file name has multiple extensions (example.tar.gz), only the last one should be captured ("gz", not "tar.gz").

type: keyword

Expand Down
5 changes: 4 additions & 1 deletion experimental/generated/beats/fields.ecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1568,7 +1568,10 @@
level: extended
type: keyword
ignore_above: 1024
description: File extension.
description: 'File extension, excluding the leading dot.
Note that when the file name has multiple extensions (example.tar.gz), only
the last one should be captured ("gz", not "tar.gz").'
example: png
- name: gid
level: extended
Expand Down
2 changes: 1 addition & 1 deletion experimental/generated/csv/fields.csv
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ ECS_Version,Indexed,Field_Set,Field,Type,Level,Normalization,Example,Description
1.8.0-dev,true,file,file.device,keyword,extended,,sda,Device that is the source of the file.
1.8.0-dev,true,file,file.directory,wildcard,extended,,/home/alice,Directory where the file is located.
1.8.0-dev,true,file,file.drive_letter,keyword,extended,,C,Drive letter where the file is located.
1.8.0-dev,true,file,file.extension,keyword,extended,,png,File extension.
1.8.0-dev,true,file,file.extension,keyword,extended,,png,"File extension, excluding the leading dot."
1.8.0-dev,true,file,file.gid,keyword,extended,,1001,Primary group ID (GID) of the file.
1.8.0-dev,true,file,file.group,keyword,extended,,alice,Primary group name of the file.
1.8.0-dev,true,file,file.hash.md5,keyword,extended,,,MD5 hash.
Expand Down
7 changes: 5 additions & 2 deletions experimental/generated/ecs/ecs_flat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2502,14 +2502,17 @@ file.drive_letter:
type: keyword
file.extension:
dashed_name: file-extension
description: File extension.
description: 'File extension, excluding the leading dot.
Note that when the file name has multiple extensions (example.tar.gz), only the
last one should be captured ("gz", not "tar.gz").'
example: png
flat_name: file.extension
ignore_above: 1024
level: extended
name: extension
normalize: []
short: File extension.
short: File extension, excluding the leading dot.
type: keyword
file.gid:
dashed_name: file-gid
Expand Down
7 changes: 5 additions & 2 deletions experimental/generated/ecs/ecs_nested.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2925,14 +2925,17 @@ file:
type: keyword
file.extension:
dashed_name: file-extension
description: File extension.
description: 'File extension, excluding the leading dot.
Note that when the file name has multiple extensions (example.tar.gz), only
the last one should be captured ("gz", not "tar.gz").'
example: png
flat_name: file.extension
ignore_above: 1024
level: extended
name: extension
normalize: []
short: File extension.
short: File extension, excluding the leading dot.
type: keyword
file.gid:
dashed_name: file-gid
Expand Down
5 changes: 4 additions & 1 deletion generated/beats/fields.ecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1604,7 +1604,10 @@
level: extended
type: keyword
ignore_above: 1024
description: File extension.
description: 'File extension, excluding the leading dot.
Note that when the file name has multiple extensions (example.tar.gz), only
the last one should be captured ("gz", not "tar.gz").'
example: png
- name: gid
level: extended
Expand Down
2 changes: 1 addition & 1 deletion generated/csv/fields.csv
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ ECS_Version,Indexed,Field_Set,Field,Type,Level,Normalization,Example,Description
1.8.0-dev,true,file,file.device,keyword,extended,,sda,Device that is the source of the file.
1.8.0-dev,true,file,file.directory,keyword,extended,,/home/alice,Directory where the file is located.
1.8.0-dev,true,file,file.drive_letter,keyword,extended,,C,Drive letter where the file is located.
1.8.0-dev,true,file,file.extension,keyword,extended,,png,File extension.
1.8.0-dev,true,file,file.extension,keyword,extended,,png,"File extension, excluding the leading dot."
1.8.0-dev,true,file,file.gid,keyword,extended,,1001,Primary group ID (GID) of the file.
1.8.0-dev,true,file,file.group,keyword,extended,,alice,Primary group name of the file.
1.8.0-dev,true,file,file.hash.md5,keyword,extended,,,MD5 hash.
Expand Down
7 changes: 5 additions & 2 deletions generated/ecs/ecs_flat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2544,14 +2544,17 @@ file.drive_letter:
type: keyword
file.extension:
dashed_name: file-extension
description: File extension.
description: 'File extension, excluding the leading dot.
Note that when the file name has multiple extensions (example.tar.gz), only the
last one should be captured ("gz", not "tar.gz").'
example: png
flat_name: file.extension
ignore_above: 1024
level: extended
name: extension
normalize: []
short: File extension.
short: File extension, excluding the leading dot.
type: keyword
file.gid:
dashed_name: file-gid
Expand Down
7 changes: 5 additions & 2 deletions generated/ecs/ecs_nested.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2968,14 +2968,17 @@ file:
type: keyword
file.extension:
dashed_name: file-extension
description: File extension.
description: 'File extension, excluding the leading dot.
Note that when the file name has multiple extensions (example.tar.gz), only
the last one should be captured ("gz", not "tar.gz").'
example: png
flat_name: file.extension
ignore_above: 1024
level: extended
name: extension
normalize: []
short: File extension.
short: File extension, excluding the leading dot.
type: keyword
file.gid:
dashed_name: file-gid
Expand Down
7 changes: 6 additions & 1 deletion schemas/file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,12 @@
- name: extension
level: extended
type: keyword
description: File extension.
short: File extension, excluding the leading dot.
description: >
File extension, excluding the leading dot.
Note that when the file name has multiple extensions (example.tar.gz),
only the last one should be captured ("gz", not "tar.gz").
example: png

- name: type
Expand Down

0 comments on commit 501d404

Please sign in to comment.