Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vSphere][resourcepool] Add support for new metrics in resourcepool metricset #40456

Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
0858fd0
[vSphere][ResourcePool]:
kush-elastic Aug 8, 2024
5e1b64c
add changelog entry
kush-elastic Aug 8, 2024
c653b3c
golangci-lint fix
kush-elastic Aug 8, 2024
d975d37
Merge branch 'main' into 21-vsphere-implement-the-new-resourcepool-me…
kush-elastic Aug 12, 2024
6ebb045
add vm names per resourcePool
kush-elastic Aug 20, 2024
885d633
mage update
kush-elastic Aug 20, 2024
7f426d1
update changelog entry
kush-elastic Aug 20, 2024
e557f27
Merge branch 'main' of https://github.com/kush-elastic/beats into 21-…
kush-elastic Aug 20, 2024
fbb0ce1
Merge branch 'main' of https://github.com/kush-elastic/beats into 21-…
kush-elastic Aug 22, 2024
a287b1f
make update
kush-elastic Aug 28, 2024
758f665
resolve review comment
kush-elastic Aug 28, 2024
c92a742
Merge branch 'main' of https://github.com/kush-elastic/beats into 21-…
kush-elastic Aug 28, 2024
717b0f9
make update
kush-elastic Aug 28, 2024
7c0eac9
update changelog entry
kush-elastic Aug 28, 2024
a3cbefe
resolved review comments
kush-elastic Aug 28, 2024
64383c9
resolve review comments
kush-elastic Aug 28, 2024
cde5628
Merge branch 'main' into 21-vsphere-implement-the-new-resourcepool-me…
kush-elastic Aug 28, 2024
73c6581
field updates
kush-elastic Aug 28, 2024
266e031
Update metricbeat/module/vsphere/resourcepool/_meta/fields.yml
kush-elastic Aug 29, 2024
ae7e453
Update metricbeat/module/vsphere/resourcepool/_meta/fields.yml
kush-elastic Aug 29, 2024
0b30d2c
Update metricbeat/module/vsphere/resourcepool/_meta/fields.yml
kush-elastic Aug 29, 2024
036d2d6
Merge branch 'main' of https://github.com/kush-elastic/beats into 21-…
kush-elastic Aug 29, 2024
b26056c
update changelog entry
kush-elastic Aug 29, 2024
6025a7c
minor changes
kush-elastic Aug 29, 2024
ba03a89
Merge branch 'main' into 21-vsphere-implement-the-new-resourcepool-me…
kush-elastic Aug 29, 2024
0071311
Merge branch 'main' into 21-vsphere-implement-the-new-resourcepool-me…
kush-elastic Aug 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff]
- Allow metricsets to report their status via control v2 protocol. {pull}40025[40025]
- Remove fallback to the node limit for the `kubernetes.pod.cpu.usage.limit.pct` and `kubernetes.pod.memory.usage.limit.pct` metrics calculation
- Add support for Kibana status metricset in v8 format {pull}40275[40275]
- Add new metricset resourcepool for the Vsphere module. {pull}40429[40429]

*Osquerybeat*

Expand Down
132 changes: 132 additions & 0 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -67018,6 +67018,138 @@ format: bytes
Network names


type: keyword

--

[float]
=== resourcepool

resourcepool





*`vsphere.resourcepool.cpu.entitlement.mhz`*::
+
--
Amount of CPU resources allocated to the resource pool.


type: long

--


*`vsphere.resourcepool.cpu.usage.pct`*::
+
--
CPU usage average in percentage.


type: long

--

*`vsphere.resourcepool.cpu.usage.mhz`*::
+
--
CPU usage average in MHz.


type: long

--



*`vsphere.resourcepool.cpu.active.average.pct`*::
+
--
CPU active average in percentage.


type: long

--


*`vsphere.resourcepool.cpu.max.pct`*::
+
--
CPU active max in percentage.


type: long

--



*`vsphere.resourcepool.memory.entitlement.mhz`*::
+
--
Amount of Memory resources allocated to the resource pool.


type: long

--


*`vsphere.resourcepool.memory.usage.pct`*::
+
--
Memory usage average in percentage.


type: long

--


*`vsphere.resourcepool.memory.shared.bytes`*::
+
--
Memory shared average in Bytes.


type: long

format: bytes

--


*`vsphere.resourcepool.memory.swap.bytes`*::
+
--
Memory swap in average in Bytes.


type: long

format: bytes

--

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


type: keyword

--

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


type: keyword

--
Expand Down
4 changes: 4 additions & 0 deletions metricbeat/docs/modules/vsphere.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,16 @@ The following metricsets are available:

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

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

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

include::vsphere/datastore.asciidoc[]

include::vsphere/host.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,8 +311,9 @@ 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] |
.3+| .3+| |<<metricbeat-metricset-vsphere-datastore,datastore>>
.4+| .4+| |<<metricbeat-metricset-vsphere-datastore,datastore>>
|<<metricbeat-metricset-vsphere-host,host>>
|<<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/module/vsphere/fields.go

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

54 changes: 54 additions & 0 deletions metricbeat/module/vsphere/resourcepool/_meta/data.json
kush-elastic marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"@timestamp": "2024-08-06T10:38:51.952Z",
"metricset": {
"name": "resourcepool",
"period": 10000
},
"service": {
"type": "vsphere",
"address": "https://localhost:8989/sdk"
},
"event": {
"dataset": "vsphere.resourcepool",
"module": "vsphere",
"duration": 57462824
},
"vsphere": {
"resourcepool": {
"name": "Resources",
"status": "green",
"cpu": {
"active": {
"average": {
"pct": 0
},
"max": {
"pct": 0
}
},
"entitlement": {
"mhz": 0
},
"usage": {
"pct": 0,
"mhz": 2018
}
},
"memory": {
"entitlement": {
"mhz": 0
},
"usage": {
"pct": 0
},
"shared": {
"bytes": 1078817000
},
"swap": {
"bytes": 0
}
}
}
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is the resourcepool metricset of the module vsphere.
85 changes: 85 additions & 0 deletions metricbeat/module/vsphere/resourcepool/_meta/fields.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
- name: resourcepool
type: group
release: beta
ishleenk17 marked this conversation as resolved.
Show resolved Hide resolved
description: >
resourcepool
fields:
- name: cpu
type: group
fields:
- name: entitlement
type: group
fields:
- name: mhz
type: long
description: >
Amount of CPU resources allocated to the resource pool.
- name: usage
type: group
fields:
- name: pct
type: long
description: >
CPU usage average in percentage.
- name: mhz
type: long
description: >
CPU usage average in MHz.
kush-elastic marked this conversation as resolved.
Show resolved Hide resolved
- name: active
type: group
fields:
- name: average
type: group
fields:
- name: pct
kush-elastic marked this conversation as resolved.
Show resolved Hide resolved
type: long
description: >
CPU active average in percentage.
- name: max
kush-elastic marked this conversation as resolved.
Show resolved Hide resolved
type: group
fields:
- name: pct
type: long
description: >
CPU active max in percentage.
- name: memory
type: group
fields:
- name: entitlement
type: group
fields:
- name: mhz
type: long
description: >
Amount of Memory resources allocated to the resource pool.
- name: usage
type: group
fields:
- name: pct
type: long
description: >
Memory usage average in percentage.
- name: shared
type: group
fields:
- name: bytes
type: long
description: >
Memory shared average in Bytes.
kush-elastic marked this conversation as resolved.
Show resolved Hide resolved
format: bytes
- name: swap
type: group
fields:
- name: bytes
type: long
description: >
Memory swap in average in Bytes.
kush-elastic marked this conversation as resolved.
Show resolved Hide resolved
format: bytes
- name: name
type: keyword
description: >
Name of resource pool.
- name: status
type: keyword
description: >
The overall health status of a host in the vSphere environment.
Loading
Loading