From 0fedc25cf852c6f62c9dd4aa3ddfa2b4beca56b1 Mon Sep 17 00:00:00 2001 From: stefans-elastic Date: Wed, 14 May 2025 11:22:45 +0300 Subject: [PATCH 1/5] add new virtual machine metrics --- packages/vsphere/changelog.yml | 5 +++ .../virtualmachine/fields/fields.yml | 33 ++++++++++++++++++- packages/vsphere/docs/README.md | 7 ++++ 3 files changed, 44 insertions(+), 1 deletion(-) diff --git a/packages/vsphere/changelog.yml b/packages/vsphere/changelog.yml index d9b408eda92..0518c598802 100644 --- a/packages/vsphere/changelog.yml +++ b/packages/vsphere/changelog.yml @@ -1,4 +1,9 @@ # newer versions go on top +- version: "1.19.0" + changes: + - description: Add new metrics to vSphere Virtual Machine dataset (CPU usage percentage, disk average usage, disk read/write rate, number of disk reads/writes, memory usage percentage). + type: enhancement + link: https://github.com/elastic/integrations/pull/1 - version: "1.18.2" changes: - description: Updated vSphere supported versions in documentation. diff --git a/packages/vsphere/data_stream/virtualmachine/fields/fields.yml b/packages/vsphere/data_stream/virtualmachine/fields/fields.yml index c4f9e359fa8..969ac9dde52 100644 --- a/packages/vsphere/data_stream/virtualmachine/fields/fields.yml +++ b/packages/vsphere/data_stream/virtualmachine/fields/fields.yml @@ -45,6 +45,10 @@ metric_type: counter description: > Total Reserved CPU in Mhz. + - name: cpu.percent + type: long + description: > + CPU usage as a percentage. - name: cpu.free.mhz type: long metric_type: gauge @@ -78,6 +82,10 @@ description: > Free memory of Guest in bytes. format: bytes + - name: memory.percent + type: long + description: > + Memory usage as percent of total configured or available memory. - name: custom_fields type: object object_type: keyword @@ -172,4 +180,27 @@ - name: warning.names type: keyword description: > - List of all the warnings on this virtualmachine. \ No newline at end of file + List of all the warnings on this virtualmachine. + - name: disk + type: group + fields: + - name: average.kiloBytesPerSecond + type: long + description: > + Aggregated disk I/O rate. + - name: read.average.kiloBytesPerSecond + type: long + description: > + Rate at which data is read from each virtual disk on the virtual machine. + - name: write.average.kiloBytesPerSecond + type: long + description: > + Rate at which data is written to each virtual disk on the virtual machine. + - name: numberRead + type: long + description: > + Number of times data was read. + - name: numberWrite + type: long + description: > + Number of disk writes. \ No newline at end of file diff --git a/packages/vsphere/docs/README.md b/packages/vsphere/docs/README.md index 6916cd0c544..50171975110 100644 --- a/packages/vsphere/docs/README.md +++ b/packages/vsphere/docs/README.md @@ -1219,15 +1219,22 @@ Please refer to the following [document](https://www.elastic.co/guide/en/ecs/cur | service.address | Address where data about this service was collected from. This should be a URI, network address (ipv4:port or [ipv6]:port) or a resource path (sockets). | keyword | | | | vsphere.virtualmachine.alert.names | List of all the alerts on this virtualmachine. | keyword | | | | vsphere.virtualmachine.cpu.free.mhz | Available CPU in Mhz. | long | | gauge | +| vsphere.virtualmachine.cpu.percent | CPU usage as a percentage. | long | | | | vsphere.virtualmachine.cpu.total.mhz | Total Reserved CPU in Mhz. | long | | counter | | vsphere.virtualmachine.cpu.used.mhz | Used CPU in Mhz. | long | | gauge | | vsphere.virtualmachine.custom_fields | Custom fields. | object | | | | vsphere.virtualmachine.datastore.count | Number of datastores associated to this virtualmachine. | long | | gauge | | vsphere.virtualmachine.datastore.names | Names of the datastore associated to this virtualmachine. | keyword | | | +| vsphere.virtualmachine.disk.average.kiloBytesPerSecond | Aggregated disk I/O rate. | long | | | +| vsphere.virtualmachine.disk.numberRead | Number of times data was read. | long | | | +| vsphere.virtualmachine.disk.numberWrite | Number of disk writes. | long | | | +| vsphere.virtualmachine.disk.read.average.kiloBytesPerSecond | Rate at which data is read from each virtual disk on the virtual machine. | long | | | +| vsphere.virtualmachine.disk.write.average.kiloBytesPerSecond | Rate at which data is written to each virtual disk on the virtual machine. | long | | | | vsphere.virtualmachine.host.hostname | Hostname of the host. | keyword | | | | vsphere.virtualmachine.host.id | Host id. | keyword | | | | vsphere.virtualmachine.id | Unique virtual machine ID. | keyword | | | | vsphere.virtualmachine.memory.free.guest.bytes | Free memory of Guest in bytes. | long | byte | gauge | +| vsphere.virtualmachine.memory.percent | Memory usage as percent of total configured or available memory. | long | | | | vsphere.virtualmachine.memory.total.guest.bytes | Total memory of Guest in bytes. | long | byte | gauge | | vsphere.virtualmachine.memory.used.guest.bytes | Used memory of Guest in bytes. | long | byte | gauge | | vsphere.virtualmachine.memory.used.host.bytes | Used memory of Host in bytes. | long | byte | gauge | From 4578f9655e3764e238c82d24ce840bd2b2a7ee29 Mon Sep 17 00:00:00 2001 From: stefans-elastic Date: Wed, 14 May 2025 11:23:52 +0300 Subject: [PATCH 2/5] fix package version in manifest.yml --- packages/vsphere/manifest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vsphere/manifest.yml b/packages/vsphere/manifest.yml index c20042bb7e1..637a2f54e92 100644 --- a/packages/vsphere/manifest.yml +++ b/packages/vsphere/manifest.yml @@ -1,7 +1,7 @@ title: VMware vSphere format_version: "3.0.2" name: vsphere -version: "1.18.2" +version: "1.19.0" description: This Elastic integration collects metrics and logs from vSphere/vCenter servers type: integration categories: From 48959758dd11a342984bb28f6fe8fb681571a057 Mon Sep 17 00:00:00 2001 From: stefans-elastic Date: Wed, 14 May 2025 11:26:53 +0300 Subject: [PATCH 3/5] fix PR id in changelog.yml --- packages/vsphere/changelog.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vsphere/changelog.yml b/packages/vsphere/changelog.yml index 0518c598802..1c165bdbfed 100644 --- a/packages/vsphere/changelog.yml +++ b/packages/vsphere/changelog.yml @@ -3,7 +3,7 @@ changes: - description: Add new metrics to vSphere Virtual Machine dataset (CPU usage percentage, disk average usage, disk read/write rate, number of disk reads/writes, memory usage percentage). type: enhancement - link: https://github.com/elastic/integrations/pull/1 + link: https://github.com/elastic/integrations/pull/13907 - version: "1.18.2" changes: - description: Updated vSphere supported versions in documentation. From 7c09a38a78bc7ca77e1043a60cf10f7d315d4432 Mon Sep 17 00:00:00 2001 From: Stefan Stas Date: Fri, 23 May 2025 10:36:24 +0300 Subject: [PATCH 4/5] make field names same as produced by metricbeat --- .../data_stream/virtualmachine/fields/fields.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/vsphere/data_stream/virtualmachine/fields/fields.yml b/packages/vsphere/data_stream/virtualmachine/fields/fields.yml index 969ac9dde52..679d762c00a 100644 --- a/packages/vsphere/data_stream/virtualmachine/fields/fields.yml +++ b/packages/vsphere/data_stream/virtualmachine/fields/fields.yml @@ -45,7 +45,7 @@ metric_type: counter description: > Total Reserved CPU in Mhz. - - name: cpu.percent + - name: cpu.usage.percent type: long description: > CPU usage as a percentage. @@ -82,7 +82,7 @@ description: > Free memory of Guest in bytes. format: bytes - - name: memory.percent + - name: memory.usage.percent type: long description: > Memory usage as percent of total configured or available memory. @@ -184,15 +184,15 @@ - name: disk type: group fields: - - name: average.kiloBytesPerSecond + - name: average.bytesPerSecond type: long description: > Aggregated disk I/O rate. - - name: read.average.kiloBytesPerSecond + - name: read.average.bytesPerSecond type: long description: > Rate at which data is read from each virtual disk on the virtual machine. - - name: write.average.kiloBytesPerSecond + - name: write.average.bytesPerSecond type: long description: > Rate at which data is written to each virtual disk on the virtual machine. From 7d49013bf2cdda301a89e81c8f2b5e76fb428a01 Mon Sep 17 00:00:00 2001 From: Stefan Stas Date: Mon, 26 May 2025 11:43:30 +0300 Subject: [PATCH 5/5] make field names match the ones in beats --- .../data_stream/virtualmachine/fields/fields.yml | 14 +++++++------- packages/vsphere/docs/README.md | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/vsphere/data_stream/virtualmachine/fields/fields.yml b/packages/vsphere/data_stream/virtualmachine/fields/fields.yml index 679d762c00a..a04686a961e 100644 --- a/packages/vsphere/data_stream/virtualmachine/fields/fields.yml +++ b/packages/vsphere/data_stream/virtualmachine/fields/fields.yml @@ -46,7 +46,7 @@ description: > Total Reserved CPU in Mhz. - name: cpu.usage.percent - type: long + type: scaled_float description: > CPU usage as a percentage. - name: cpu.free.mhz @@ -83,7 +83,7 @@ Free memory of Guest in bytes. format: bytes - name: memory.usage.percent - type: long + type: scaled_float description: > Memory usage as percent of total configured or available memory. - name: custom_fields @@ -184,23 +184,23 @@ - name: disk type: group fields: - - name: average.bytesPerSecond + - name: average.bytes type: long description: > Aggregated disk I/O rate. - - name: read.average.bytesPerSecond + - name: read.average.bytes type: long description: > Rate at which data is read from each virtual disk on the virtual machine. - - name: write.average.bytesPerSecond + - name: write.average.bytes type: long description: > Rate at which data is written to each virtual disk on the virtual machine. - - name: numberRead + - name: numberRead.count type: long description: > Number of times data was read. - - name: numberWrite + - name: numberWrite.count type: long description: > Number of disk writes. \ No newline at end of file diff --git a/packages/vsphere/docs/README.md b/packages/vsphere/docs/README.md index 50171975110..24b97f6e1c1 100644 --- a/packages/vsphere/docs/README.md +++ b/packages/vsphere/docs/README.md @@ -1219,23 +1219,23 @@ Please refer to the following [document](https://www.elastic.co/guide/en/ecs/cur | service.address | Address where data about this service was collected from. This should be a URI, network address (ipv4:port or [ipv6]:port) or a resource path (sockets). | keyword | | | | vsphere.virtualmachine.alert.names | List of all the alerts on this virtualmachine. | keyword | | | | vsphere.virtualmachine.cpu.free.mhz | Available CPU in Mhz. | long | | gauge | -| vsphere.virtualmachine.cpu.percent | CPU usage as a percentage. | long | | | | vsphere.virtualmachine.cpu.total.mhz | Total Reserved CPU in Mhz. | long | | counter | +| vsphere.virtualmachine.cpu.usage.percent | CPU usage as a percentage. | scaled_float | | | | vsphere.virtualmachine.cpu.used.mhz | Used CPU in Mhz. | long | | gauge | | vsphere.virtualmachine.custom_fields | Custom fields. | object | | | | vsphere.virtualmachine.datastore.count | Number of datastores associated to this virtualmachine. | long | | gauge | | vsphere.virtualmachine.datastore.names | Names of the datastore associated to this virtualmachine. | keyword | | | -| vsphere.virtualmachine.disk.average.kiloBytesPerSecond | Aggregated disk I/O rate. | long | | | -| vsphere.virtualmachine.disk.numberRead | Number of times data was read. | long | | | -| vsphere.virtualmachine.disk.numberWrite | Number of disk writes. | long | | | -| vsphere.virtualmachine.disk.read.average.kiloBytesPerSecond | Rate at which data is read from each virtual disk on the virtual machine. | long | | | -| vsphere.virtualmachine.disk.write.average.kiloBytesPerSecond | Rate at which data is written to each virtual disk on the virtual machine. | long | | | +| vsphere.virtualmachine.disk.average.bytes | Aggregated disk I/O rate. | long | | | +| vsphere.virtualmachine.disk.numberRead.count | Number of times data was read. | long | | | +| vsphere.virtualmachine.disk.numberWrite.count | Number of disk writes. | long | | | +| vsphere.virtualmachine.disk.read.average.bytes | Rate at which data is read from each virtual disk on the virtual machine. | long | | | +| vsphere.virtualmachine.disk.write.average.bytes | Rate at which data is written to each virtual disk on the virtual machine. | long | | | | vsphere.virtualmachine.host.hostname | Hostname of the host. | keyword | | | | vsphere.virtualmachine.host.id | Host id. | keyword | | | | vsphere.virtualmachine.id | Unique virtual machine ID. | keyword | | | | vsphere.virtualmachine.memory.free.guest.bytes | Free memory of Guest in bytes. | long | byte | gauge | -| vsphere.virtualmachine.memory.percent | Memory usage as percent of total configured or available memory. | long | | | | vsphere.virtualmachine.memory.total.guest.bytes | Total memory of Guest in bytes. | long | byte | gauge | +| vsphere.virtualmachine.memory.usage.percent | Memory usage as percent of total configured or available memory. | scaled_float | | | | vsphere.virtualmachine.memory.used.guest.bytes | Used memory of Guest in bytes. | long | byte | gauge | | vsphere.virtualmachine.memory.used.host.bytes | Used memory of Host in bytes. | long | byte | gauge | | vsphere.virtualmachine.name | Virtual machine name. | keyword | | |