Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instance_name in GCE add_cloud_metadata processor #4414

Merged
merged 1 commit into from
May 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ https://github.com/elastic/beats/compare/v6.0.0-alpha1...master[Check the HEAD d
- Added the possibility to set Elasticsearch mapping template settings from the Beat configuration file. {pull}4284[4284] {pull}4317[4317]
- Add a variable to the SysV init scripts to make it easier to change the user. {pull}4340[4340]
- Add the option to write the generated Elasticsearch mapping template into a file. {pull}4323[4323]
- Add instance_name in GCE add_cloud_metadata processor. {pull}4414[4414]

*Filebeat*
- Add experimental Redis slow log prospector type. {pull}4180[4180]
Expand Down
6 changes: 6 additions & 0 deletions filebeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,12 @@ Name of the cloud provider. Possible values are ec2, gce, or digitalocean.
Instance ID of the host machine.


[float]
=== meta.cloud.instance_name

Instance name of the host machine.


[float]
=== meta.cloud.machine_type

Expand Down
6 changes: 6 additions & 0 deletions heartbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@ Name of the cloud provider. Possible values are ec2, gce, or digitalocean.
Instance ID of the host machine.


[float]
=== meta.cloud.instance_name

Instance name of the host machine.


[float]
=== meta.cloud.machine_type

Expand Down
4 changes: 4 additions & 0 deletions libbeat/processors/add_cloud_metadata/_meta/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
description: >
Instance ID of the host machine.

- name: meta.cloud.instance_name
description: >
Instance name of the host machine.

- name: meta.cloud.machine_type
example: t2.medium
description: >
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ func newGceMetadataFetcher(config common.Config) (*metadataFetcher, error) {
if instance, ok := m["instance"].(map[string]interface{}); ok {
s.Schema{
"instance_id": c.StrFromNum("id"),
"instance_name": c.Str("name"),
"machine_type": c.Str("machineType"),
"availability_zone": c.Str("zone"),
}.ApplyTo(out, instance)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const gceMetadataV1 = `{
}
],
"hostname": "test-gce-dev.c.test-dev.internal",
"name": "test-gce-dev",
"id": 3910564293633576924,
"image": "",
"licenses": [
Expand Down Expand Up @@ -137,6 +138,7 @@ func TestRetrieveGCEMetadata(t *testing.T) {
"cloud": common.MapStr{
"provider": "gce",
"instance_id": "3910564293633576924",
"instance_name": "test-gce-dev",
"machine_type": "projects/111111111111/machineTypes/f1-micro",
"availability_zone": "projects/111111111111/zones/us-east1-b",
"project_id": "test-dev",
Expand Down
6 changes: 6 additions & 0 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2663,6 +2663,12 @@ Name of the cloud provider. Possible values are ec2, gce, or digitalocean.
Instance ID of the host machine.


[float]
=== meta.cloud.instance_name

Instance name of the host machine.


[float]
=== meta.cloud.machine_type

Expand Down
6 changes: 6 additions & 0 deletions packetbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -1066,6 +1066,12 @@ Name of the cloud provider. Possible values are ec2, gce, or digitalocean.
Instance ID of the host machine.


[float]
=== meta.cloud.instance_name

Instance name of the host machine.


[float]
=== meta.cloud.machine_type

Expand Down
6 changes: 6 additions & 0 deletions winlogbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@ Name of the cloud provider. Possible values are ec2, gce, or digitalocean.
Instance ID of the host machine.


[float]
=== meta.cloud.instance_name

Instance name of the host machine.


[float]
=== meta.cloud.machine_type

Expand Down