Skip to content

Commit 41d2aa1

Browse files
authored
[box_events] - Clean-up field definitions (#8097)
Use 'external: ecs' where possible. Set 'type: group' instead of 'type: object' on field groups. Remove unnecessary field attributes (like group, footnote). Add 'type' to fields where it was missing. I think an explicit type will be better than depending on defaults being injected elsewhere. Resolve duplicate 'type: group/object' [git-generate] cd packages/box_events go run github.com/andrewkroh/fydler@e90f9031ec48 -fix **/fields/* elastic-package format [git-generate] elastic-package changelog add --link #8097 --type enhancement --next minor --description "Modified the field definitions to reference ECS where possible and remove invalid field attributes." * [box_events] - Remove format attribute [git-generate] go run github.com/andrewkroh/fydler@e90f9031ec48 -fix -a unknownattribute packages/box_events/**/fields/*.yml
1 parent 6719d69 commit 41d2aa1

File tree

8 files changed

+97
-238
lines changed

8 files changed

+97
-238
lines changed

packages/box_events/changelog.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# newer versions go on top
2+
- version: "2.2.0"
3+
changes:
4+
- description: Modified the field definitions to reference ECS where possible and remove invalid field attributes.
5+
type: enhancement
6+
link: https://github.com/elastic/integrations/pull/8097
27
- version: 2.1.0
38
changes:
49
- description: Update the package format_version to 3.0.0.

packages/box_events/data_stream/events/fields/agent.yml

Lines changed: 27 additions & 157 deletions
Original file line numberDiff line numberDiff line change
@@ -1,184 +1,65 @@
11
- name: cloud
2-
title: Cloud
3-
group: 2
4-
description: Fields related to the cloud or infrastructure the events are coming from.
5-
footnote: 'Examples: If Metricbeat is running on an EC2 host and fetches data from its host, the cloud info contains the data about this machine. If Metricbeat runs on a remote machine outside the cloud and fetches data from a service running in the cloud, the field contains cloud data from the machine the service is running on.'
62
type: group
73
fields:
84
- name: account.id
9-
level: extended
10-
type: keyword
11-
ignore_above: 1024
12-
description: 'The cloud account or organization id used to identify different entities in a multi-tenant environment.
13-
14-
Examples: AWS account id, Google Cloud ORG Id, or other unique identifier.'
15-
example: 666777888999
5+
external: ecs
166
- name: availability_zone
17-
level: extended
18-
type: keyword
19-
ignore_above: 1024
20-
description: Availability zone in which this host is running.
21-
example: us-east-1c
7+
external: ecs
228
- name: instance.id
23-
level: extended
24-
type: keyword
25-
ignore_above: 1024
26-
description: Instance ID of the host machine.
27-
example: i-1234567890abcdef0
9+
external: ecs
2810
- name: instance.name
29-
level: extended
30-
type: keyword
31-
ignore_above: 1024
32-
description: Instance name of the host machine.
11+
external: ecs
3312
- name: machine.type
34-
level: extended
35-
type: keyword
36-
ignore_above: 1024
37-
description: Machine type of the host machine.
38-
example: t2.medium
13+
external: ecs
3914
- name: provider
40-
level: extended
41-
type: keyword
42-
ignore_above: 1024
43-
description: Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean.
44-
example: aws
15+
external: ecs
4516
- name: region
46-
level: extended
47-
type: keyword
48-
ignore_above: 1024
49-
description: Region in which this host is running.
50-
example: us-east-1
17+
external: ecs
5118
- name: project.id
52-
type: keyword
53-
description: Name of the project in Google Cloud.
19+
external: ecs
5420
- name: image.id
5521
type: keyword
5622
description: Image ID for the cloud instance.
5723
- name: container
58-
title: Container
59-
group: 2
60-
description: 'Container fields are used for meta information about the specific container that is the source of information.
61-
62-
These fields help correlate data based containers from any runtime.'
6324
type: group
6425
fields:
6526
- name: id
66-
level: core
67-
type: keyword
68-
ignore_above: 1024
69-
description: Unique container id.
27+
external: ecs
7028
- name: image.name
71-
level: extended
72-
type: keyword
73-
ignore_above: 1024
74-
description: Name of the image the container was built on.
29+
external: ecs
7530
- name: labels
76-
level: extended
77-
type: object
78-
object_type: keyword
79-
description: Image labels.
31+
external: ecs
8032
- name: name
81-
level: extended
82-
type: keyword
83-
ignore_above: 1024
84-
description: Container name.
33+
external: ecs
8534
- name: host
86-
title: Host
87-
group: 2
88-
description: 'A host is defined as a general computing instance.
89-
90-
ECS host.* fields should be populated with details about the host on which the event happened, or from which the measurement was taken. Host types include hardware, virtual machines, Docker containers, and Kubernetes nodes.'
9135
type: group
9236
fields:
9337
- name: architecture
94-
level: core
95-
type: keyword
96-
ignore_above: 1024
97-
description: Operating system architecture.
98-
example: x86_64
38+
external: ecs
9939
- name: domain
100-
level: extended
101-
type: keyword
102-
ignore_above: 1024
103-
description: 'Name of the domain of which the host is a member.
104-
105-
For example, on Windows this could be the host''s Active Directory domain or NetBIOS domain name. For Linux this could be the domain of the host''s LDAP provider.'
106-
example: CONTOSO
107-
default_field: false
40+
external: ecs
10841
- name: hostname
109-
level: core
110-
type: keyword
111-
ignore_above: 1024
112-
description: 'Hostname of the host.
113-
114-
It normally contains what the `hostname` command returns on the host machine.'
42+
external: ecs
11543
- name: id
116-
level: core
117-
type: keyword
118-
ignore_above: 1024
119-
description: 'Unique host id.
120-
121-
As hostname is not always unique, use values that are meaningful in your environment.
122-
123-
Example: The current usage of `beat.name`.'
44+
external: ecs
12445
- name: ip
125-
level: core
126-
type: ip
127-
description: Host ip addresses.
46+
external: ecs
12847
- name: mac
129-
level: core
130-
type: keyword
131-
ignore_above: 1024
132-
description: Host mac addresses.
48+
external: ecs
13349
- name: name
134-
level: core
135-
type: keyword
136-
ignore_above: 1024
137-
description: 'Name of the host.
138-
139-
It can contain what `hostname` returns on Unix systems, the fully qualified domain name, or a name specified by the user. The sender decides which value to use.'
50+
external: ecs
14051
- name: os.family
141-
level: extended
142-
type: keyword
143-
ignore_above: 1024
144-
description: OS family (such as redhat, debian, freebsd, windows).
145-
example: debian
52+
external: ecs
14653
- name: os.kernel
147-
level: extended
148-
type: keyword
149-
ignore_above: 1024
150-
description: Operating system kernel version as a raw string.
151-
example: 4.4.0-112-generic
54+
external: ecs
15255
- name: os.name
153-
level: extended
154-
type: keyword
155-
ignore_above: 1024
156-
multi_fields:
157-
- name: text
158-
type: text
159-
norms: false
160-
default_field: false
161-
description: Operating system name, without the version.
162-
example: Mac OS X
56+
external: ecs
16357
- name: os.platform
164-
level: extended
165-
type: keyword
166-
ignore_above: 1024
167-
description: Operating system platform (such centos, ubuntu, windows).
168-
example: darwin
58+
external: ecs
16959
- name: os.version
170-
level: extended
171-
type: keyword
172-
ignore_above: 1024
173-
description: Operating system version as a raw string.
174-
example: 10.14.1
60+
external: ecs
17561
- name: type
176-
level: core
177-
type: keyword
178-
ignore_above: 1024
179-
description: 'Type of host.
180-
181-
For Cloud providers this can be the machine type like `t2.medium`. If vm, this could be the container, for example, or other information meaningful in your environment.'
62+
external: ecs
18263
- name: containerized
18364
type: boolean
18465
description: >
@@ -198,25 +79,15 @@
19879
19980
- name: cpu.pct
20081
type: scaled_float
201-
format: percent
20282
description: >
20383
Percent CPU used. This value is normalized by the number of CPU cores and it ranges from 0 to 1.
20484
20585
- name: disk.read.bytes
206-
type: long
207-
format: bytes
208-
description: >
209-
The total number of bytes read successfully in a given period of time.
210-
86+
external: ecs
21187
- name: disk.write.bytes
212-
type: long
213-
format: bytes
214-
description: >
215-
The total number of bytes write successfully in a given period of time.
216-
88+
external: ecs
21789
- name: network.in.bytes
21890
type: long
219-
format: bytes
22091
description: >
22192
The number of bytes received on all network interfaces by the host in a given period of time.
22293
@@ -227,7 +98,6 @@
22798
22899
- name: network.out.bytes
229100
type: long
230-
format: bytes
231101
description: >
232102
The number of bytes sent out on all network interfaces by the host in a given period of time.
233103

packages/box_events/data_stream/events/fields/base-fields.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
11
- name: data_stream.type
2-
type: constant_keyword
3-
description: Data stream type.
2+
external: ecs
43
- name: data_stream.dataset
5-
type: constant_keyword
6-
description: Data stream dataset.
4+
external: ecs
75
- name: data_stream.namespace
8-
type: constant_keyword
9-
description: Data stream namespace.
10-
- name: '@timestamp'
11-
type: date
12-
description: Event timestamp.
6+
external: ecs
7+
- name: "@timestamp"
8+
external: ecs
139
- name: event.module
1410
type: constant_keyword
15-
description: Event module
11+
external: ecs
1612
value: box_events
1713
- name: event.dataset
1814
type: constant_keyword
19-
description: Event dataset
15+
external: ecs
2016
value: box_events.events
2117
- name: input.type
2218
description: Type of Filebeat input.

packages/box_events/data_stream/events/fields/ecs.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,8 @@
108108
name: threat.indicator.geo.country_iso_code
109109
- external: ecs
110110
name: threat.indicator.geo.country_name
111-
- description: Longitude and latitude.
112-
level: core
113-
name: threat.indicator.geo.location
114-
type: geo_point
111+
- name: threat.indicator.geo.location
112+
external: ecs
115113
- external: ecs
116114
name: threat.indicator.geo.region_iso_code
117115
- external: ecs

0 commit comments

Comments
 (0)