Skip to content

Commit 28316bf

Browse files
author
Mathieu Martin
authored
[1.7] Clarify that file extension should exclude the dot. (#1016) (#1021)
1 parent eaf52dc commit 28316bf

File tree

12 files changed

+43
-15
lines changed

12 files changed

+43
-15
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ All notable changes to this project will be documented in this file based on the
1010
#### Bugfixes
1111

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

1415
#### Added
1516

code/go/ecs/file.go

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/field-details.asciidoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2109,7 +2109,9 @@ example: `C`
21092109
// ===============================================================
21102110

21112111
| file.extension
2112-
| File extension.
2112+
| File extension, excluding the leading dot.
2113+
2114+
Note that when the file name has multiple extensions (example.tar.gz), only the last one should be captured ("gz", not "tar.gz").
21132115

21142116
type: keyword
21152117

experimental/generated/beats/fields.ecs.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1568,7 +1568,10 @@
15681568
level: extended
15691569
type: keyword
15701570
ignore_above: 1024
1571-
description: File extension.
1571+
description: 'File extension, excluding the leading dot.
1572+
1573+
Note that when the file name has multiple extensions (example.tar.gz), only
1574+
the last one should be captured ("gz", not "tar.gz").'
15721575
example: png
15731576
- name: gid
15741577
level: extended

experimental/generated/csv/fields.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ ECS_Version,Indexed,Field_Set,Field,Type,Level,Normalization,Example,Description
174174
1.7.0-dev,true,file,file.device,keyword,extended,,sda,Device that is the source of the file.
175175
1.7.0-dev,true,file,file.directory,wildcard,extended,,/home/alice,Directory where the file is located.
176176
1.7.0-dev,true,file,file.drive_letter,keyword,extended,,C,Drive letter where the file is located.
177-
1.7.0-dev,true,file,file.extension,keyword,extended,,png,File extension.
177+
1.7.0-dev,true,file,file.extension,keyword,extended,,png,"File extension, excluding the leading dot."
178178
1.7.0-dev,true,file,file.gid,keyword,extended,,1001,Primary group ID (GID) of the file.
179179
1.7.0-dev,true,file,file.group,keyword,extended,,alice,Primary group name of the file.
180180
1.7.0-dev,true,file,file.hash.md5,keyword,extended,,,MD5 hash.

experimental/generated/ecs/ecs_flat.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2502,14 +2502,17 @@ file.drive_letter:
25022502
type: keyword
25032503
file.extension:
25042504
dashed_name: file-extension
2505-
description: File extension.
2505+
description: 'File extension, excluding the leading dot.
2506+
2507+
Note that when the file name has multiple extensions (example.tar.gz), only the
2508+
last one should be captured ("gz", not "tar.gz").'
25062509
example: png
25072510
flat_name: file.extension
25082511
ignore_above: 1024
25092512
level: extended
25102513
name: extension
25112514
normalize: []
2512-
short: File extension.
2515+
short: File extension, excluding the leading dot.
25132516
type: keyword
25142517
file.gid:
25152518
dashed_name: file-gid

experimental/generated/ecs/ecs_nested.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2925,14 +2925,17 @@ file:
29252925
type: keyword
29262926
file.extension:
29272927
dashed_name: file-extension
2928-
description: File extension.
2928+
description: 'File extension, excluding the leading dot.
2929+
2930+
Note that when the file name has multiple extensions (example.tar.gz), only
2931+
the last one should be captured ("gz", not "tar.gz").'
29292932
example: png
29302933
flat_name: file.extension
29312934
ignore_above: 1024
29322935
level: extended
29332936
name: extension
29342937
normalize: []
2935-
short: File extension.
2938+
short: File extension, excluding the leading dot.
29362939
type: keyword
29372940
file.gid:
29382941
dashed_name: file-gid

generated/beats/fields.ecs.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1604,7 +1604,10 @@
16041604
level: extended
16051605
type: keyword
16061606
ignore_above: 1024
1607-
description: File extension.
1607+
description: 'File extension, excluding the leading dot.
1608+
1609+
Note that when the file name has multiple extensions (example.tar.gz), only
1610+
the last one should be captured ("gz", not "tar.gz").'
16081611
example: png
16091612
- name: gid
16101613
level: extended

generated/csv/fields.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ ECS_Version,Indexed,Field_Set,Field,Type,Level,Normalization,Example,Description
175175
1.7.0-dev,true,file,file.device,keyword,extended,,sda,Device that is the source of the file.
176176
1.7.0-dev,true,file,file.directory,keyword,extended,,/home/alice,Directory where the file is located.
177177
1.7.0-dev,true,file,file.drive_letter,keyword,extended,,C,Drive letter where the file is located.
178-
1.7.0-dev,true,file,file.extension,keyword,extended,,png,File extension.
178+
1.7.0-dev,true,file,file.extension,keyword,extended,,png,"File extension, excluding the leading dot."
179179
1.7.0-dev,true,file,file.gid,keyword,extended,,1001,Primary group ID (GID) of the file.
180180
1.7.0-dev,true,file,file.group,keyword,extended,,alice,Primary group name of the file.
181181
1.7.0-dev,true,file,file.hash.md5,keyword,extended,,,MD5 hash.

generated/ecs/ecs_flat.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2544,14 +2544,17 @@ file.drive_letter:
25442544
type: keyword
25452545
file.extension:
25462546
dashed_name: file-extension
2547-
description: File extension.
2547+
description: 'File extension, excluding the leading dot.
2548+
2549+
Note that when the file name has multiple extensions (example.tar.gz), only the
2550+
last one should be captured ("gz", not "tar.gz").'
25482551
example: png
25492552
flat_name: file.extension
25502553
ignore_above: 1024
25512554
level: extended
25522555
name: extension
25532556
normalize: []
2554-
short: File extension.
2557+
short: File extension, excluding the leading dot.
25552558
type: keyword
25562559
file.gid:
25572560
dashed_name: file-gid

0 commit comments

Comments
 (0)