Skip to content

Commit

Permalink
Cloud metadata (#3729) (#3743)
Browse files Browse the repository at this point in the history
* model: add Cloud type, Metadata.Cloud field

* docs/spec: add cloud to metadata schema

* modeldecoder: decode Cloud metadata

* Update integration tests

- Add cloud metadata to testdata
- Add cloud fields to _meta/fields.common.yml for tests :(
- Update approvals docs
- Update package_tests (cargo-culted)

* Add changelog entry

* _meta: add 'overwrite: true' to duplicated fields
  • Loading branch information
axw authored May 5, 2020
1 parent 2f4b64a commit 42d9985
Show file tree
Hide file tree
Showing 54 changed files with 1,515 additions and 7 deletions.
87 changes: 87 additions & 0 deletions _meta/fields.common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -685,3 +685,90 @@
dynamic: true
description: Additional experimental data sent by the agents.

- name: cloud
title: Cloud
group: 2
type: group
description: >
Cloud metadata reported by agents
fields:
- name: account
type: group
dynamic: false
fields:
- name: id
level: extended
type: keyword
ignore_above: 1024
description: Cloud account ID
overwrite: true
- name: name
level: extended
type: keyword
ignore_above: 1024
description: Cloud account name
overwrite: true
- name: availability_zone
level: extended
type: keyword
ignore_above: 1024
description: Cloud availability zone name
example: us-east1-a
overwrite: true
- name: instance
type: group
dynamic: false
fields:
- name: id
level: extended
type: keyword
ignore_above: 1024
description: Cloud instance/machine ID
overwrite: true
- name: name
level: extended
type: keyword
ignore_above: 1024
description: Cloud instance/machine name
overwrite: true
- name: machine
type: group
dynamic: false
fields:
- name: type
level: extended
type: keyword
ignore_above: 1024
description: Cloud instance/machine type
example: t2.medium
overwrite: true
- name: project
type: group
dynamic: false
fields:
- name: id
level: extended
type: keyword
ignore_above: 1024
description: Cloud project ID
overwrite: true
- name: name
level: extended
type: keyword
ignore_above: 1024
description: Cloud project name
overwrite: true
- name: provider
level: extended
type: keyword
ignore_above: 1024
description: Cloud provider name
example: gcp
overwrite: true
- name: region
level: extended
type: keyword
ignore_above: 1024
description: Cloud region name
example: us-east1
overwrite: true
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,26 @@
"client": {
"ip": "12.53.12.1"
},
"cloud": {
"account": {
"id": "account_id",
"name": "account_name"
},
"availability_zone": "cloud_availability_zone",
"instance": {
"id": "instance_id",
"name": "instance_name"
},
"machine": {
"type": "machine_type"
},
"project": {
"id": "project_id",
"name": "project_name"
},
"provider": "cloud_provider",
"region": "cloud_region"
},
"container": {
"id": "container-id"
},
Expand Down Expand Up @@ -354,6 +374,26 @@
"name": "elastic-node",
"version": "3.14.0"
},
"cloud": {
"account": {
"id": "account_id",
"name": "account_name"
},
"availability_zone": "cloud_availability_zone",
"instance": {
"id": "instance_id",
"name": "instance_name"
},
"machine": {
"type": "machine_type"
},
"project": {
"id": "project_id",
"name": "project_name"
},
"provider": "cloud_provider",
"region": "cloud_region"
},
"container": {
"id": "container-id"
},
Expand Down Expand Up @@ -455,6 +495,26 @@
"name": "elastic-node",
"version": "3.14.0"
},
"cloud": {
"account": {
"id": "account_id",
"name": "account_name"
},
"availability_zone": "cloud_availability_zone",
"instance": {
"id": "instance_id",
"name": "instance_name"
},
"machine": {
"type": "machine_type"
},
"project": {
"id": "project_id",
"name": "project_name"
},
"provider": "cloud_provider",
"region": "cloud_region"
},
"container": {
"id": "container-id"
},
Expand Down Expand Up @@ -552,6 +612,26 @@
"name": "elastic-ruby",
"version": "2.1.3"
},
"cloud": {
"account": {
"id": "account_id",
"name": "account_name"
},
"availability_zone": "cloud_availability_zone",
"instance": {
"id": "instance_id",
"name": "instance_name"
},
"machine": {
"type": "machine_type"
},
"project": {
"id": "project_id",
"name": "project_name"
},
"provider": "cloud_provider",
"region": "cloud_region"
},
"container": {
"id": "container-id"
},
Expand Down Expand Up @@ -655,6 +735,26 @@
"name": "elastic-node",
"version": "3.14.0"
},
"cloud": {
"account": {
"id": "account_id",
"name": "account_name"
},
"availability_zone": "cloud_availability_zone",
"instance": {
"id": "instance_id",
"name": "instance_name"
},
"machine": {
"type": "machine_type"
},
"project": {
"id": "project_id",
"name": "project_name"
},
"provider": "cloud_provider",
"region": "cloud_region"
},
"container": {
"id": "container-id"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,26 @@
"51234abcdef56789"
]
},
"cloud": {
"account": {
"id": "account_id",
"name": "account_name"
},
"availability_zone": "cloud_availability_zone",
"instance": {
"id": "instance_id",
"name": "instance_name"
},
"machine": {
"type": "machine_type"
},
"project": {
"id": "project_id",
"name": "project_name"
},
"provider": "cloud_provider",
"region": "cloud_region"
},
"container": {
"id": "container-id"
},
Expand Down Expand Up @@ -126,6 +146,26 @@
"name": "elastic-node",
"version": "3.14.0"
},
"cloud": {
"account": {
"id": "account_id",
"name": "account_name"
},
"availability_zone": "cloud_availability_zone",
"instance": {
"id": "instance_id",
"name": "instance_name"
},
"machine": {
"type": "machine_type"
},
"project": {
"id": "project_id",
"name": "project_name"
},
"provider": "cloud_provider",
"region": "cloud_region"
},
"container": {
"id": "container-id"
},
Expand Down Expand Up @@ -236,6 +276,26 @@
"name": "elastic-node",
"version": "3.14.0"
},
"cloud": {
"account": {
"id": "account_id",
"name": "account_name"
},
"availability_zone": "cloud_availability_zone",
"instance": {
"id": "instance_id",
"name": "instance_name"
},
"machine": {
"type": "machine_type"
},
"project": {
"id": "project_id",
"name": "project_name"
},
"provider": "cloud_provider",
"region": "cloud_region"
},
"container": {
"id": "container-id"
},
Expand Down Expand Up @@ -350,6 +410,26 @@
"name": "elastic-node",
"version": "3.14.0"
},
"cloud": {
"account": {
"id": "account_id",
"name": "account_name"
},
"availability_zone": "cloud_availability_zone",
"instance": {
"id": "instance_id",
"name": "instance_name"
},
"machine": {
"type": "machine_type"
},
"project": {
"id": "project_id",
"name": "project_name"
},
"provider": "cloud_provider",
"region": "cloud_region"
},
"container": {
"id": "container-id"
},
Expand Down Expand Up @@ -461,6 +541,26 @@
"name": "elastic-ruby",
"version": "2.2"
},
"cloud": {
"account": {
"id": "account_id",
"name": "account_name"
},
"availability_zone": "cloud_availability_zone",
"instance": {
"id": "instance_id",
"name": "instance_name"
},
"machine": {
"type": "machine_type"
},
"project": {
"id": "project_id",
"name": "project_name"
},
"provider": "cloud_provider",
"region": "cloud_region"
},
"container": {
"id": "container-id"
},
Expand Down Expand Up @@ -654,6 +754,26 @@
"name": "elastic-node",
"version": "3.14.0"
},
"cloud": {
"account": {
"id": "account_id",
"name": "account_name"
},
"availability_zone": "cloud_availability_zone",
"instance": {
"id": "instance_id",
"name": "instance_name"
},
"machine": {
"type": "machine_type"
},
"project": {
"id": "project_id",
"name": "project_name"
},
"provider": "cloud_provider",
"region": "cloud_region"
},
"container": {
"id": "container-id"
},
Expand Down
Loading

0 comments on commit 42d9985

Please sign in to comment.