Skip to content

Commit 6719d69

Browse files
authored
[elastic_agent] - Cleanup fields.yml issues (#8079)
For fields that exist in ECS use 'external: ecs' in the field definition. Remove attributes from field definitions that have no purpose (like footnote, level, title, etc). Fix typo for description attribute in some field definitions. Remove duplicate definitions of fields within the same data stream. Fix dotted YAML key in manifest.yml. [git-generate] cd packages/elastic_agent go run github.com/andrewkroh/fydler@90f7b627e -fix -a useecs,invalidattribute,unknownattribute **/fields/*.yml perl -p -i -e 's/descripion:/description:/g' **/fields/*.yml elastic-package format elastic-package changelog add --link #8079 --type enhancement --next minor --description "Modified the field definitions to reference ECS where possible and remove invalid field attributes."
1 parent cc5374c commit 6719d69

File tree

88 files changed

+730
-3297
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+730
-3297
lines changed

packages/elastic_agent/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: "1.14.0"
3+
changes:
4+
- description: Modify field mappings to reference ECS fields where possible and remove duplicate field declarations.
5+
type: enhancement
6+
link: https://github.com/elastic/integrations/pull/8079
27
- version: "1.13.1"
38
changes:
49
- description: Fix mapping and description for the `system.process.cpu.{system,user,total}.time.ms` fields.

packages/elastic_agent/data_stream/apm_server_logs/fields/agent.yml

Lines changed: 25 additions & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -1,166 +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.\nExamples: AWS account id, Google Cloud ORG Id, or other unique identifier."
13-
example: 666777888999
5+
external: ecs
146
- name: availability_zone
15-
level: extended
16-
type: keyword
17-
ignore_above: 1024
18-
description: Availability zone in which this host is running.
19-
example: us-east-1c
7+
external: ecs
208
- name: instance.id
21-
level: extended
22-
type: keyword
23-
ignore_above: 1024
24-
description: Instance ID of the host machine.
25-
example: i-1234567890abcdef0
9+
external: ecs
2610
- name: instance.name
27-
level: extended
28-
type: keyword
29-
ignore_above: 1024
30-
description: Instance name of the host machine.
11+
external: ecs
3112
- name: machine.type
32-
level: extended
33-
type: keyword
34-
ignore_above: 1024
35-
description: Machine type of the host machine.
36-
example: t2.medium
13+
external: ecs
3714
- name: provider
38-
level: extended
39-
type: keyword
40-
ignore_above: 1024
41-
description: Name of the cloud provider. Example values are aws, azure, gcp, or digitalocean.
42-
example: aws
15+
external: ecs
4316
- name: region
44-
level: extended
45-
type: keyword
46-
ignore_above: 1024
47-
description: Region in which this host is running.
48-
example: us-east-1
17+
external: ecs
4918
- name: project.id
50-
type: keyword
51-
description: Name of the project in Google Cloud.
19+
external: ecs
5220
- name: image.id
5321
type: keyword
5422
description: Image ID for the cloud instance.
5523
- name: container
56-
title: Container
57-
group: 2
58-
description: "Container fields are used for meta information about the specific container that is the source of information.\nThese fields help correlate data based containers from any runtime."
5924
type: group
6025
fields:
6126
- name: id
62-
level: core
63-
type: keyword
64-
ignore_above: 1024
65-
description: Unique container id.
27+
external: ecs
6628
- name: image.name
67-
level: extended
68-
type: keyword
69-
ignore_above: 1024
70-
description: Name of the image the container was built on.
29+
external: ecs
7130
- name: labels
72-
level: extended
73-
type: object
74-
object_type: keyword
75-
description: Image labels.
31+
external: ecs
7632
- name: name
77-
level: extended
78-
type: keyword
79-
ignore_above: 1024
80-
description: Container name.
33+
external: ecs
8134
- name: host
82-
title: Host
83-
group: 2
84-
description: "A host is defined as a general computing instance.\nECS 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."
8535
type: group
8636
fields:
8737
- name: architecture
88-
level: core
89-
type: keyword
90-
ignore_above: 1024
91-
description: Operating system architecture.
92-
example: x86_64
38+
external: ecs
9339
- name: domain
94-
level: extended
95-
type: keyword
96-
ignore_above: 1024
97-
description: "Name of the domain of which the host is a member.\nFor 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."
98-
example: CONTOSO
99-
default_field: false
40+
external: ecs
10041
- name: hostname
101-
level: core
102-
type: keyword
103-
ignore_above: 1024
104-
description: "Hostname of the host.\nIt normally contains what the `hostname` command returns on the host machine."
42+
external: ecs
10543
- name: id
106-
level: core
107-
type: keyword
108-
ignore_above: 1024
109-
description: "Unique host id.\nAs hostname is not always unique, use values that are meaningful in your environment.\nExample: The current usage of `beat.name`."
44+
external: ecs
11045
- name: ip
111-
level: core
112-
type: ip
113-
description: Host ip addresses.
46+
external: ecs
11447
- name: mac
115-
level: core
116-
type: keyword
117-
ignore_above: 1024
118-
description: Host mac addresses.
48+
external: ecs
11949
- name: name
120-
level: core
121-
type: keyword
122-
ignore_above: 1024
123-
description: "Name of the host.\nIt 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
12451
- name: os.family
125-
level: extended
126-
type: keyword
127-
ignore_above: 1024
128-
description: OS family (such as redhat, debian, freebsd, windows).
129-
example: debian
52+
external: ecs
13053
- name: os.kernel
131-
level: extended
132-
type: keyword
133-
ignore_above: 1024
134-
description: Operating system kernel version as a raw string.
135-
example: 4.4.0-112-generic
54+
external: ecs
13655
- name: os.name
137-
level: extended
138-
type: keyword
139-
ignore_above: 1024
140-
multi_fields:
141-
- name: text
142-
type: text
143-
norms: false
144-
default_field: false
145-
description: Operating system name, without the version.
146-
example: Mac OS X
56+
external: ecs
14757
- name: os.platform
148-
level: extended
149-
type: keyword
150-
ignore_above: 1024
151-
description: Operating system platform (such centos, ubuntu, windows).
152-
example: darwin
58+
external: ecs
15359
- name: os.version
154-
level: extended
155-
type: keyword
156-
ignore_above: 1024
157-
description: Operating system version as a raw string.
158-
example: 10.14.1
60+
external: ecs
15961
- name: type
160-
level: core
161-
type: keyword
162-
ignore_above: 1024
163-
description: "Type of host.\nFor 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
16463
- name: containerized
16564
type: boolean
16665
description: >
Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
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.
6+
external: ecs
107
- name: "@timestamp"
11-
type: date
12-
description: Event timestamp.
8+
external: ecs
139
- name: event.dataset
1410
type: constant_keyword
15-
description: Event dataset
11+
external: ecs

packages/elastic_agent/data_stream/apm_server_logs/fields/fields.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
- name: message
22
external: ecs
33
- name: elastic_agent
4-
title: Elastic Agent
5-
description: Fields related to the Elastic Agents
64
type: group
75
fields:
86
- name: id

0 commit comments

Comments
 (0)