Skip to content

Commit

Permalink
Move add-cloud-metadata to ECS (#9265)
Browse files Browse the repository at this point in the history
Fields renamed:

```
* meta.cloud.instance_id -> cloud.instance.id
* meta.cloud.instance_name -> cloud.instance.name
* meta.cloud.machine_type -> cloud.machine.type
* meta.cloud.availability_zone -> cloud.availability_zone
* meta.cloud.project_id -> cloud.project.id
* meta.cloud.region -> cloud.region
```

Further changes:

* Added alias for old fields
* Update asset generation to include ECS assets in libbeat fields.yml. This is needed for testing as the aliases fields are in there.
  • Loading branch information
ruflin authored Dec 13, 2018
1 parent d8246d5 commit 9354aa0
Show file tree
Hide file tree
Showing 35 changed files with 352 additions and 211 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha1...master[Check the HEAD d

*Affecting all Beats*

- Update add_cloud_metadata fields to adjust to ECS. {pull}9265[9265]
- Automaticall cap signed integers to 63bits. {pull}8991[8991]

*Auditbeat*
Expand Down
39 changes: 24 additions & 15 deletions auditbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2509,67 +2509,76 @@ Metadata from cloud providers added by the add_cloud_metadata processor.
*`meta.cloud.provider`*::
*`cloud.project.id`*::
+
--
example: ec2
example: project-x
Name of the cloud provider. Possible values are ec2, gce, or digitalocean.
Name of the project in Google Cloud.
--
*`meta.cloud.provider`*::
+
--
type: alias
alias to: cloud.provider
--
*`meta.cloud.instance_id`*::
+
--
Instance ID of the host machine.
type: alias
alias to: cloud.instance.id
--
*`meta.cloud.instance_name`*::
+
--
Instance name of the host machine.
type: alias
alias to: cloud.instance.name
--
*`meta.cloud.machine_type`*::
+
--
example: t2.medium
Machine type of the host machine.
type: alias
alias to: cloud.machine.type
--
*`meta.cloud.availability_zone`*::
+
--
example: us-east-1c
Availability zone in which this host is running.
type: alias
alias to: cloud.availability_zone
--
*`meta.cloud.project_id`*::
+
--
example: project-x
Name of the project in Google Cloud.
type: alias
alias to: cloud.project.id
--
*`meta.cloud.region`*::
+
--
Region in which this host is running.
type: alias
alias to: cloud.region
--
Expand Down
2 changes: 1 addition & 1 deletion auditbeat/include/fields.go

Large diffs are not rendered by default.

41 changes: 41 additions & 0 deletions dev-tools/ecs-migration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,47 @@

## Suricata module

# Processor fields

# Cloud
- form: meta.cloud.provider
to: cloud.provider
alias: true
alias6: true

- form: meta.cloud.instance_id
to: cloud.instance.id
alias: true
alias6: true

- form: meta.cloud.instance_name
to: cloud.instance.name
alias: true
alias6: true

- form: meta.cloud.machine_type
to: cloud.machine.type
alias: true
alias6: true

- form: meta.cloud.availability_zone
to: cloud.availability_zone
alias: true
alias6: true

- form: meta.cloud.project_id
to: cloud.project.id
alias: true
alias6: true

- form: meta.cloud.region
to: cloud.region
alias: true
alias6: true


# Suricata module

- from: source_ecs.ip
to: source.ip
alias: true
Expand Down
39 changes: 24 additions & 15 deletions filebeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -624,67 +624,76 @@ Metadata from cloud providers added by the add_cloud_metadata processor.
*`meta.cloud.provider`*::
*`cloud.project.id`*::
+
--
example: ec2
example: project-x
Name of the cloud provider. Possible values are ec2, gce, or digitalocean.
Name of the project in Google Cloud.
--
*`meta.cloud.provider`*::
+
--
type: alias
alias to: cloud.provider
--
*`meta.cloud.instance_id`*::
+
--
Instance ID of the host machine.
type: alias
alias to: cloud.instance.id
--
*`meta.cloud.instance_name`*::
+
--
Instance name of the host machine.
type: alias
alias to: cloud.instance.name
--
*`meta.cloud.machine_type`*::
+
--
example: t2.medium
Machine type of the host machine.
type: alias
alias to: cloud.machine.type
--
*`meta.cloud.availability_zone`*::
+
--
example: us-east-1c
Availability zone in which this host is running.
type: alias
alias to: cloud.availability_zone
--
*`meta.cloud.project_id`*::
+
--
example: project-x
Name of the project in Google Cloud.
type: alias
alias to: cloud.project.id
--
*`meta.cloud.region`*::
+
--
Region in which this host is running.
type: alias
alias to: cloud.region
--
Expand Down
2 changes: 1 addition & 1 deletion filebeat/include/fields.go

Large diffs are not rendered by default.

39 changes: 24 additions & 15 deletions heartbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -100,67 +100,76 @@ Metadata from cloud providers added by the add_cloud_metadata processor.
*`meta.cloud.provider`*::
*`cloud.project.id`*::
+
--
example: ec2
example: project-x
Name of the cloud provider. Possible values are ec2, gce, or digitalocean.
Name of the project in Google Cloud.
--
*`meta.cloud.provider`*::
+
--
type: alias
alias to: cloud.provider
--
*`meta.cloud.instance_id`*::
+
--
Instance ID of the host machine.
type: alias
alias to: cloud.instance.id
--
*`meta.cloud.instance_name`*::
+
--
Instance name of the host machine.
type: alias
alias to: cloud.instance.name
--
*`meta.cloud.machine_type`*::
+
--
example: t2.medium
Machine type of the host machine.
type: alias
alias to: cloud.machine.type
--
*`meta.cloud.availability_zone`*::
+
--
example: us-east-1c
Availability zone in which this host is running.
type: alias
alias to: cloud.availability_zone
--
*`meta.cloud.project_id`*::
+
--
example: project-x
Name of the project in Google Cloud.
type: alias
alias to: cloud.project.id
--
*`meta.cloud.region`*::
+
--
Region in which this host is running.
type: alias
alias to: cloud.region
--
Expand Down
2 changes: 1 addition & 1 deletion heartbeat/include/fields.go

Large diffs are not rendered by default.

Loading

0 comments on commit 9354aa0

Please sign in to comment.