Skip to content

Commit

Permalink
[vSphere][resourcepool] Add support for new metrics in resourcepool m…
Browse files Browse the repository at this point in the history
…etricset (#40456)

* [vSphere][ResourcePool]:
- Add new Metricset
- add/update docs
- add unit tests
- local testing

* add changelog entry

* golangci-lint fix

* add vm names per resourcePool

* mage update

* update changelog entry

* make update

* resolve review comment

* make update

* update changelog entry

* resolved review comments

* resolve review comments

* field updates

* Update metricbeat/module/vsphere/resourcepool/_meta/fields.yml

Co-authored-by: Ishleen Kaur <[email protected]>

* Update metricbeat/module/vsphere/resourcepool/_meta/fields.yml

Co-authored-by: Ishleen Kaur <[email protected]>

* Update metricbeat/module/vsphere/resourcepool/_meta/fields.yml

Co-authored-by: Ishleen Kaur <[email protected]>

* update changelog entry

* minor changes

---------

Co-authored-by: Ishleen Kaur <[email protected]>
  • Loading branch information
kush-elastic and ishleenk17 authored Aug 29, 2024
1 parent 3445a3e commit 1f77e6e
Show file tree
Hide file tree
Showing 21 changed files with 905 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff]
- Add SSL support to mysql module {pull}37997[37997]
- Add SSL support for aerospike module {pull}38126[38126]
- Add new metricset network for the vSphere module. {pull}40559[40559]
- Add new metricset resourcepool for the vSphere module. {pull}40456[40456]

*Metricbeat*

Expand Down
226 changes: 226 additions & 0 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -67519,6 +67519,232 @@ type: long

--

[float]
=== resourcepool

Resource pool information from vSphere environment.




*`vsphere.resourcepool.cpu.usage.mhz`*::
+
--
Basic CPU performance statistics, in MHz.


type: long

--

*`vsphere.resourcepool.cpu.demand.mhz`*::
+
--
Basic CPU performance statistics, in MHz.


type: long

--


*`vsphere.resourcepool.cpu.entitlement.mhz`*::
+
--
The amount of CPU resource, in MHz, that this VM is entitled to, as calculated by DRS.


type: long

--

*`vsphere.resourcepool.cpu.entitlement.static.mhz`*::
+
--
The static CPU resource entitlement for a virtual machine.


type: long

--



*`vsphere.resourcepool.memory.usage.guest.bytes`*::
+
--
Guest memory utilization statistics, in bytes.


type: long

format: bytes

--

*`vsphere.resourcepool.memory.usage.host.bytes`*::
+
--
Host memory utilization statistics, in bytes.


type: long

format: bytes

--


*`vsphere.resourcepool.memory.entitlement.bytes`*::
+
--
The amount of memory, in bytes, that this VM is entitled to, as calculated by DRS.


type: long

format: bytes

--

*`vsphere.resourcepool.memory.entitlement.static.bytes`*::
+
--
The static memory resource entitlement for a virtual machine, in bytes.


type: long

format: bytes

--

*`vsphere.resourcepool.memory.private.bytes`*::
+
--
The portion of memory, in bytes, that is granted to a virtual machine from non-shared host memory.


type: long

format: bytes

--

*`vsphere.resourcepool.memory.shared.bytes`*::
+
--
The portion of memory, in bytes, that is granted to a virtual machine from host memory that is shared between VMs.


type: long

format: bytes

--

*`vsphere.resourcepool.memory.swapped.bytes`*::
+
--
The portion of memory, in bytes, that is granted to a virtual machine from the host's swap space.


type: long

format: bytes

--

*`vsphere.resourcepool.memory.ballooned.bytes`*::
+
--
The size of the balloon driver in a virtual machine, in bytes.


type: long

format: bytes

--


*`vsphere.resourcepool.memory.overhead.bytes`*::
+
--
The amount of memory resource (in bytes) that will be used by a virtual machine above its guest memory requirements.


type: long

format: bytes

--

*`vsphere.resourcepool.memory.overhead.consumed.bytes`*::
+
--
The amount of overhead memory, in bytes, currently being consumed to run a VM.


type: long

format: bytes

--

*`vsphere.resourcepool.memory.compressed.bytes`*::
+
--
The amount of compressed memory currently consumed by VM, in bytes.


type: long

format: bytes

--

*`vsphere.resourcepool.name`*::
+
--
The name of the resource pool.


type: keyword

--

*`vsphere.resourcepool.status`*::
+
--
The overall health status of a host in the vSphere environment.


type: keyword

--


*`vsphere.resourcepool.vm.count`*::
+
--
Number of virtual machines on the resource pool.


type: long

--

*`vsphere.resourcepool.vm.names`*::
+
--
Names of virtual machines on the resource pool.


type: keyword

--

[float]
=== virtualmachine

Expand Down
8 changes: 6 additions & 2 deletions metricbeat/docs/modules/vsphere.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This file is generated! See scripts/mage/docs_collector.go

The vSphere module uses the https://github.com/vmware/govmomi[Govmomi] library to collect metrics from any Vmware SDK URL (ESXi/VCenter). This library is built for and tested against ESXi and vCenter 5.5, 6.0 and 6.5.

By default it enables the metricsets `network`, `datastore`, `host` and `virtualmachine`.
By default it enables the metricsets `network`, `resourcepool`, `datastore`, `host` and `virtualmachine`.

[float]
=== Dashboard
Expand All @@ -35,7 +35,7 @@ in <<configuration-metricbeat>>. Here is an example configuration:
metricbeat.modules:
- module: vsphere
enabled: true
metricsets: ["datastore", "host", "virtualmachine", "network"]
metricsets: ["datastore", "host", "virtualmachine", "network", "resourcepool"]
# Real-time data collection – An ESXi Server collects data for each performance counter every 20 seconds.
period: 20s
hosts: ["https://localhost/sdk"]
Expand All @@ -59,6 +59,8 @@ The following metricsets are available:

* <<metricbeat-metricset-vsphere-network,network>>

* <<metricbeat-metricset-vsphere-resourcepool,resourcepool>>

* <<metricbeat-metricset-vsphere-virtualmachine,virtualmachine>>

include::vsphere/datastore.asciidoc[]
Expand All @@ -67,6 +69,8 @@ include::vsphere/host.asciidoc[]

include::vsphere/network.asciidoc[]

include::vsphere/resourcepool.asciidoc[]

include::vsphere/virtualmachine.asciidoc[]

:edit_url!:
29 changes: 29 additions & 0 deletions metricbeat/docs/modules/vsphere/resourcepool.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
////
This file is generated! See scripts/mage/docs_collector.go
////
:edit_url: https://github.com/elastic/beats/edit/main/metricbeat/module/vsphere/resourcepool/_meta/docs.asciidoc


[[metricbeat-metricset-vsphere-resourcepool]]
=== vSphere resourcepool metricset

beta[]

include::../../../module/vsphere/resourcepool/_meta/docs.asciidoc[]

This is a default metricset. If the host module is unconfigured, this metricset is enabled by default.

:edit_url:

==== Fields

For a description of each field in the metricset, see the
<<exported-fields-vsphere,exported fields>> section.

Here is an example document generated by this metricset:

[source,json]
----
include::../../../module/vsphere/resourcepool/_meta/data.json[]
----
:edit_url!:
3 changes: 2 additions & 1 deletion metricbeat/docs/modules_list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,10 @@ This file is generated! See scripts/mage/docs_collector.go
|<<metricbeat-module-uwsgi,uWSGI>> |image:./images/icon-yes.png[Prebuilt dashboards are available] |
.1+| .1+| |<<metricbeat-metricset-uwsgi-status,status>>
|<<metricbeat-module-vsphere,vSphere>> |image:./images/icon-yes.png[Prebuilt dashboards are available] |
.4+| .4+| |<<metricbeat-metricset-vsphere-datastore,datastore>>
.5+| .5+| |<<metricbeat-metricset-vsphere-datastore,datastore>>
|<<metricbeat-metricset-vsphere-host,host>>
|<<metricbeat-metricset-vsphere-network,network>> beta[]
|<<metricbeat-metricset-vsphere-resourcepool,resourcepool>> beta[]
|<<metricbeat-metricset-vsphere-virtualmachine,virtualmachine>>
|<<metricbeat-module-windows,Windows>> |image:./images/icon-yes.png[Prebuilt dashboards are available] |
.2+| .2+| |<<metricbeat-metricset-windows-perfmon,perfmon>>
Expand Down
1 change: 1 addition & 0 deletions metricbeat/include/list_common.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion metricbeat/metricbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@ metricbeat.modules:
#------------------------------- VSphere Module -------------------------------
- module: vsphere
enabled: true
metricsets: ["datastore", "host", "virtualmachine", "network"]
metricsets: ["datastore", "host", "virtualmachine", "network", "resourcepool"]
# Real-time data collection – An ESXi Server collects data for each performance counter every 20 seconds.
period: 20s
hosts: ["https://localhost/sdk"]
Expand Down
1 change: 1 addition & 0 deletions metricbeat/module/vsphere/_meta/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Now setup your metricbeat config to connect to Govcsim:
- host
- virtualmachine
- network
- resourcepool
enabled: true
period: 5s
hosts: ["https://127.0.0.1:8989/sdk"]
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/vsphere/_meta/config.reference.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- module: vsphere
enabled: true
metricsets: ["datastore", "host", "virtualmachine", "network"]
metricsets: ["datastore", "host", "virtualmachine", "network", "resourcepool"]
# Real-time data collection – An ESXi Server collects data for each performance counter every 20 seconds.
period: 20s
hosts: ["https://localhost/sdk"]
Expand Down
1 change: 1 addition & 0 deletions metricbeat/module/vsphere/_meta/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# - host
# - virtualmachine
# - network
# - resourcepool
# Real-time data collection – An ESXi Server collects data for each performance counter every 20 seconds.
period: 20s
hosts: ["https://localhost/sdk"]
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/vsphere/_meta/docs.asciidoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The vSphere module uses the https://github.com/vmware/govmomi[Govmomi] library to collect metrics from any Vmware SDK URL (ESXi/VCenter). This library is built for and tested against ESXi and vCenter 5.5, 6.0 and 6.5.

By default it enables the metricsets `network`, `datastore`, `host` and `virtualmachine`.
By default it enables the metricsets `network`, `resourcepool`, `datastore`, `host` and `virtualmachine`.

[float]
=== Dashboard
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/vsphere/fields.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1f77e6e

Please sign in to comment.