diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index d8c7cf79cfa..1f27c94fc89 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -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] diff --git a/filebeat/docs/fields.asciidoc b/filebeat/docs/fields.asciidoc index a6d408f5f1d..e894d8d2a23 100644 --- a/filebeat/docs/fields.asciidoc +++ b/filebeat/docs/fields.asciidoc @@ -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 diff --git a/heartbeat/docs/fields.asciidoc b/heartbeat/docs/fields.asciidoc index 5e3cbd4ab2a..ec2b374cd68 100644 --- a/heartbeat/docs/fields.asciidoc +++ b/heartbeat/docs/fields.asciidoc @@ -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 diff --git a/libbeat/processors/add_cloud_metadata/_meta/fields.yml b/libbeat/processors/add_cloud_metadata/_meta/fields.yml index 03e364c013f..1347d04de00 100644 --- a/libbeat/processors/add_cloud_metadata/_meta/fields.yml +++ b/libbeat/processors/add_cloud_metadata/_meta/fields.yml @@ -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: > diff --git a/libbeat/processors/add_cloud_metadata/provider_google_gce.go b/libbeat/processors/add_cloud_metadata/provider_google_gce.go index f6a84ccde08..beb3c2aabed 100644 --- a/libbeat/processors/add_cloud_metadata/provider_google_gce.go +++ b/libbeat/processors/add_cloud_metadata/provider_google_gce.go @@ -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) diff --git a/libbeat/processors/add_cloud_metadata/provider_google_gce_test.go b/libbeat/processors/add_cloud_metadata/provider_google_gce_test.go index 87f8447d789..de6ed3d5e9a 100644 --- a/libbeat/processors/add_cloud_metadata/provider_google_gce_test.go +++ b/libbeat/processors/add_cloud_metadata/provider_google_gce_test.go @@ -24,6 +24,7 @@ const gceMetadataV1 = `{ } ], "hostname": "test-gce-dev.c.test-dev.internal", + "name": "test-gce-dev", "id": 3910564293633576924, "image": "", "licenses": [ @@ -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", diff --git a/metricbeat/docs/fields.asciidoc b/metricbeat/docs/fields.asciidoc index f9856397403..b3bea16d90a 100644 --- a/metricbeat/docs/fields.asciidoc +++ b/metricbeat/docs/fields.asciidoc @@ -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 diff --git a/packetbeat/docs/fields.asciidoc b/packetbeat/docs/fields.asciidoc index 1783be6ddb1..1e65b85aef8 100644 --- a/packetbeat/docs/fields.asciidoc +++ b/packetbeat/docs/fields.asciidoc @@ -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 diff --git a/winlogbeat/docs/fields.asciidoc b/winlogbeat/docs/fields.asciidoc index 03e35a17065..bb826805f3f 100644 --- a/winlogbeat/docs/fields.asciidoc +++ b/winlogbeat/docs/fields.asciidoc @@ -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