Skip to content

Commit 1eb4e79

Browse files
author
kaiyan-sheng
authored
Add memory metrics into compute googlecloud (#18802)
* Add memory metrics into compute googlecloud * update unit test and data.json for memory metrics
1 parent df6f216 commit 1eb4e79

14 files changed

Lines changed: 274 additions & 59 deletions

File tree

CHANGELOG.next.asciidoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ field. You can revert this change by configuring tags for the module and omittin
206206
- Remove specific win32 api errors from events in perfmon. {issue}18292[18292] {pull}18361[18361]
207207
- Fix application_pool metricset after pdh changes. {pull}18477[18477]
208208
- Fix tags_filter for cloudwatch metricset in aws. {pull}18524[18524]
209+
- Add missing network.sent_packets_count metric into compute metricset in googlecloud module. {pull}18802[18802]
209210

210211
*Packetbeat*
211212

@@ -440,6 +441,7 @@ field. You can revert this change by configuring tags for the module and omittin
440441
- Update MSSQL module to fix some SSPI authentication and add brackets to USE statements {pull}17862[17862]]
441442
- Add client address to events from http server module {pull}18336[18336]
442443
- Remove required for region/zone and make stackdriver a metricset in googlecloud. {issue}16785[16785] {pull}18398[18398]
444+
- Add memory metrics into compute googlecloud. {pull}18802[18802]
443445

444446
*Packetbeat*
445447

metricbeat/docs/fields.asciidoc

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18232,6 +18232,9 @@ GCP module
1823218232
*`googlecloud.labels`*::
1823318233
+
1823418234
--
18235+
Google cloud monitoring metrics labels
18236+
18237+
1823518238
type: object
1823618239

1823718240
--
@@ -18383,6 +18386,43 @@ type: long
1838318386

1838418387
--
1838518388

18389+
18390+
*`googlecloud.compute.instance.memory.balloon.ram_size.value`*::
18391+
+
18392+
--
18393+
The total amount of memory in the VM. This metric is only available for VMs that belong to the e2 family.
18394+
18395+
type: long
18396+
18397+
--
18398+
18399+
*`googlecloud.compute.instance.memory.balloon.ram_used.value`*::
18400+
+
18401+
--
18402+
Memory currently used in the VM. This metric is only available for VMs that belong to the e2 family.
18403+
18404+
type: long
18405+
18406+
--
18407+
18408+
*`googlecloud.compute.instance.memory.balloon.swap_in_bytes_count.value`*::
18409+
+
18410+
--
18411+
The amount of memory read into the guest from its own swap space. This metric is only available for VMs that belong to the e2 family.
18412+
18413+
type: long
18414+
18415+
--
18416+
18417+
*`googlecloud.compute.instance.memory.balloon.swap_out_bytes_count.value`*::
18418+
+
18419+
--
18420+
The amount of memory written from the guest to its own swap space. This metric is only available for VMs that belong to the e2 family.
18421+
18422+
type: long
18423+
18424+
--
18425+
1838618426
[float]
1838718427
=== loadbalancing
1838818428

x-pack/metricbeat/module/googlecloud/_meta/fields.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,21 @@
99
fields:
1010
- name: labels
1111
type: object
12+
description: >
13+
Google cloud monitoring metrics labels
1214
fields:
1315
- name: user.*
1416
type: object
17+
object_type: keyword
1518
- name: metadata.*
1619
type: object
20+
object_type: keyword
1721
- name: metrics.*
1822
type: object
23+
object_type: keyword
1924
- name: system.*
2025
type: object
26+
object_type: keyword
2127
- name: "stackdriver.*.*.*.*"
2228
type: object
2329
object_type: double

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

Lines changed: 39 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,47 +5,66 @@
55
"id": "elastic-observability"
66
},
77
"instance": {
8-
"id": "1174463293187628268",
9-
"name": "gke-observability-8--observability-8--bc1afd95-ngmh"
8+
"id": "7692260917184259934",
9+
"name": "instance-test-ks"
1010
},
1111
"machine": {
12-
"type": "n1-standard-4"
12+
"type": "e2-standard-2"
1313
},
1414
"provider": "googlecloud"
1515
},
16-
"cloud.availability_zone": "europe-west1-c",
16+
"cloud.availability_zone": "us-central1-a",
1717
"event": {
1818
"dataset": "googlecloud.compute",
1919
"duration": 115000,
2020
"module": "googlecloud"
2121
},
2222
"googlecloud": {
2323
"compute": {
24+
"firewall": {
25+
"dropped_bytes_count": {
26+
"value": 171
27+
},
28+
"dropped_packets_count": {
29+
"value": 4
30+
}
31+
},
2432
"instance": {
25-
"disk": {
26-
"read_bytes_count": {
27-
"value": 0
28-
},
29-
"read_ops_count": {
30-
"value": 0
33+
"cpu": {
34+
"reserved_cores": {
35+
"value": 2
3136
},
32-
"write_bytes_count": {
33-
"value": 0
37+
"usage_time": {
38+
"value": 0.1803964574089818
3439
},
35-
"write_ops_count": {
36-
"value": 0
40+
"utilization": {
41+
"value": 0.001503303811741515
3742
}
43+
},
44+
"memory": {
45+
"balloon": {
46+
"ram_size": {
47+
"value": 7896264704
48+
},
49+
"ram_used": {
50+
"value": 416518144
51+
},
52+
"swap_in_bytes_count": {
53+
"value": 0
54+
},
55+
"swap_out_bytes_count": {
56+
"value": 0
57+
}
58+
}
59+
},
60+
"uptime": {
61+
"value": 60.000000000000455
3862
}
3963
}
4064
},
4165
"labels": {
42-
"metrics": {
43-
"device_name": "disk-2",
44-
"device_type": "permanent",
45-
"storage_type": "pd-standard"
46-
},
4766
"user": {
48-
"goog-gke-node": ""
67+
"created-by": "ks"
4968
}
5069
}
5170
},

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

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
"id": "elastic-observability"
66
},
77
"instance": {
8-
"id": "1174463293187628268",
9-
"name": "gke-observability-8--observability-8--bc1afd95-ngmh"
8+
"id": "7692260917184259934",
9+
"name": "instance-test-ks"
1010
},
1111
"machine": {
12-
"type": "n1-standard-4"
12+
"type": "e2-standard-2"
1313
},
1414
"provider": "googlecloud"
1515
},
16-
"cloud.availability_zone": "europe-west1-c",
16+
"cloud.availability_zone": "us-central1-a",
1717
"event": {
1818
"dataset": "googlecloud.compute",
1919
"duration": 115000,
@@ -23,32 +23,48 @@
2323
"compute": {
2424
"firewall": {
2525
"dropped_bytes_count": {
26-
"value": 181
26+
"value": 171
2727
},
2828
"dropped_packets_count": {
29-
"value": 3
29+
"value": 4
3030
}
3131
},
3232
"instance": {
3333
"cpu": {
3434
"reserved_cores": {
35-
"value": 4
35+
"value": 2
3636
},
3737
"usage_time": {
38-
"value": 63.478293027728796
38+
"value": 0.1803964574089818
3939
},
4040
"utilization": {
41-
"value": 0.26449288761553663
41+
"value": 0.001503303811741515
42+
}
43+
},
44+
"memory": {
45+
"balloon": {
46+
"ram_size": {
47+
"value": 7896264704
48+
},
49+
"ram_used": {
50+
"value": 416518144
51+
},
52+
"swap_in_bytes_count": {
53+
"value": 0
54+
},
55+
"swap_out_bytes_count": {
56+
"value": 0
57+
}
4258
}
4359
},
4460
"uptime": {
45-
"value": 60
61+
"value": 60.000000000000455
4662
}
4763
}
4864
},
4965
"labels": {
5066
"user": {
51-
"goog-gke-node": ""
67+
"created-by": "ks"
5268
}
5369
}
5470
},

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
"id": "elastic-observability"
66
},
77
"instance": {
8-
"id": "8390997210852978465",
9-
"name": "gke-observability-7--observability-7--3dd3e39b-0jm5"
8+
"id": "7692260917184259934",
9+
"name": "instance-test-ks"
1010
},
1111
"machine": {
12-
"type": "n1-standard-4"
12+
"type": "e2-standard-2"
1313
},
1414
"provider": "googlecloud"
1515
},
16-
"cloud.availability_zone": "europe-west1-c",
16+
"cloud.availability_zone": "us-central1-a",
1717
"event": {
1818
"dataset": "googlecloud.compute",
1919
"duration": 115000,
@@ -30,22 +30,22 @@
3030
"value": 0
3131
},
3232
"write_bytes_count": {
33-
"value": 0
33+
"value": 158506
3434
},
3535
"write_ops_count": {
36-
"value": 0
36+
"value": 25
3737
}
3838
}
3939
}
4040
},
4141
"labels": {
4242
"metrics": {
43-
"device_name": "gke-observability-7-1--pvc-65581044-7d5d-11ea-8cd9-42010af0011c",
43+
"device_name": "instance-test-ks",
4444
"device_type": "permanent",
4545
"storage_type": "pd-standard"
4646
},
4747
"user": {
48-
"goog-gke-node": ""
48+
"created-by": "ks"
4949
}
5050
}
5151
},

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

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
"id": "elastic-observability"
66
},
77
"instance": {
8-
"id": "2528596280375797115",
9-
"name": "gke-dev-next-oblt-dev-next-oblt-pool-404d7f0c-cpj6"
8+
"id": "7692260917184259934",
9+
"name": "instance-test-ks"
1010
},
1111
"machine": {
12-
"type": "n1-standard-4"
12+
"type": "e2-standard-2"
1313
},
1414
"provider": "googlecloud"
1515
},
16-
"cloud.availability_zone": "europe-west1-c",
16+
"cloud.availability_zone": "us-central1-a",
1717
"event": {
1818
"dataset": "googlecloud.compute",
1919
"duration": 115000,
@@ -23,22 +23,38 @@
2323
"compute": {
2424
"firewall": {
2525
"dropped_bytes_count": {
26-
"value": 386
26+
"value": 277
2727
},
2828
"dropped_packets_count": {
29-
"value": 7
29+
"value": 5
3030
}
3131
},
3232
"instance": {
3333
"cpu": {
3434
"reserved_cores": {
35-
"value": 4
35+
"value": 2
3636
},
3737
"usage_time": {
38-
"value": 106.88293868489563
38+
"value": 0.18404532833979204
3939
},
4040
"utilization": {
41-
"value": 0.4453455778537318
41+
"value": 0.001533711069498267
42+
}
43+
},
44+
"memory": {
45+
"balloon": {
46+
"ram_size": {
47+
"value": 7896264704
48+
},
49+
"ram_used": {
50+
"value": 416260096
51+
},
52+
"swap_in_bytes_count": {
53+
"value": 0
54+
},
55+
"swap_out_bytes_count": {
56+
"value": 0
57+
}
4258
}
4359
},
4460
"uptime": {
@@ -48,7 +64,7 @@
4864
},
4965
"labels": {
5066
"user": {
51-
"goog-gke-node": ""
67+
"created-by": "ks"
5268
}
5369
}
5470
},

0 commit comments

Comments
 (0)