Skip to content

Commit 48e0660

Browse files
authored
Region and zone ecs fields nested in cloud field (#37015)
1 parent 9ad141b commit 48e0660

File tree

8 files changed

+21
-20
lines changed

8 files changed

+21
-20
lines changed

CHANGELOG.next.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ is collected by it.
150150
- Add log error when statsd server fails to start {pull}36477[36477]
151151
- Fix CassandraConnectionClosures metric configuration {pull}34742[34742]
152152
- Fix event mapping implementation for statsd module {pull}36925[36925]
153+
- The region and availability_zone ecs fields nested within the cloud field. {pull}37015[37015]
153154

154155
*Osquerybeat*
155156

x-pack/metricbeat/module/gcp/compute/_meta/data.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
"id": "1113015278728017638",
1010
"name": "gke-apm-ci-k8s-cluster-pool-2-e8852348-58mx"
1111
},
12-
"provider": "gcp"
12+
"provider": "gcp",
13+
"availability_zone": "us-central1-a",
14+
"region": "us-central1"
1315
},
14-
"cloud.availability_zone": "us-central1-c",
15-
"cloud.region": "us-central1",
1616
"event": {
1717
"dataset": "gcp.compute",
1818
"duration": 115000,

x-pack/metricbeat/module/gcp/compute/_meta/data_cpu.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
"id": "7206859884978665190",
1010
"name": "gke-apm-ci-k8s-cluster-pool-2-e8852348-rt8n"
1111
},
12-
"provider": "gcp"
12+
"provider": "gcp",
13+
"availability_zone": "us-central1-a",
14+
"region": "us-central1"
1315
},
14-
"cloud.availability_zone": "us-central1-c",
15-
"cloud.region": "us-central1",
1616
"event": {
1717
"dataset": "gcp.compute",
1818
"duration": 115000,

x-pack/metricbeat/module/gcp/compute/_meta/data_disk.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
"id": "4281532529829668842",
1010
"name": "synthetics-service"
1111
},
12-
"provider": "gcp"
12+
"provider": "gcp",
13+
"availability_zone": "us-central1-a",
14+
"region": "us-central1"
1315
},
14-
"cloud.availability_zone": "us-central1-a",
15-
"cloud.region": "us-central1",
1616
"event": {
1717
"dataset": "gcp.compute",
1818
"duration": 115000,

x-pack/metricbeat/module/gcp/compute/_meta/data_firewall.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
"id": "8825965883407652424",
1010
"name": "heartbeat-los-angeles"
1111
},
12-
"provider": "gcp"
12+
"provider": "gcp",
13+
"availability_zone": "us-west2-a",
14+
"region": "us-west2-a"
1315
},
14-
"cloud.availability_zone": "us-west2-a",
15-
"cloud.region": "us-west2",
1616
"event": {
1717
"dataset": "gcp.compute",
1818
"duration": 115000,

x-pack/metricbeat/module/gcp/compute/_meta/data_memory.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
"machine": {
1313
"type": "e2-micro"
1414
},
15-
"provider": "gcp"
15+
"provider": "gcp",
16+
"availability_zone": "us-central1-a",
17+
"region": "us-central1"
1618
},
17-
"cloud.availability_zone": "us-central1-a",
18-
"cloud.region": "us-central1",
1919
"event": {
2020
"dataset": "gcp.compute",
2121
"duration": 115000,

x-pack/metricbeat/module/gcp/compute/_meta/data_network.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
"id": "1113015278728017638",
1010
"name": "gke-apm-ci-k8s-cluster-pool-2-e8852348-58mx"
1111
},
12-
"provider": "gcp"
12+
"provider": "gcp",
13+
"availability_zone": "us-central1-a",
14+
"region": "us-central1"
1315
},
14-
"cloud.availability_zone": "us-central1-c",
15-
"cloud.region": "us-central1",
1616
"event": {
1717
"dataset": "gcp.compute",
1818
"duration": 115000,

x-pack/metricbeat/module/gcp/timeseries_metadata_collector.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ func (s *StackdriverTimeSeriesMetadataCollector) Metadata(ctx context.Context, i
6262
}
6363

6464
if availabilityZone != "" {
65-
ecs[ECSCloud+"."+ECSCloudAvailabilityZone] = availabilityZone
65+
_, _ = ecs.Put(ECSCloud+"."+ECSCloudAvailabilityZone, availabilityZone)
6666

6767
// Get region name from availability zone name
6868
region := getRegionName(availabilityZone)
6969
if region != "" {
70-
ecs[ECSCloud+"."+ECSCloudRegion] = region
70+
_, _ = ecs.Put(ECSCloud+"."+ECSCloudRegion, region)
7171
}
7272
}
7373

0 commit comments

Comments
 (0)