Skip to content

Commit 30320a3

Browse files
authored
[vSphere][datastore_cluster] Add support for new metrics in datastore_cluster metricset (#40634)
* initial commit for datastore cluster * mage update * update: - data.json - field.yml * doc updates * datastore_cluster -> datastorecluster * resolve review comments * fix UTs * update URL for UTs * update UTs * fix field mapping * update data.json
1 parent 7f317fd commit 30320a3

20 files changed

+415
-14
lines changed

metricbeat/docs/fields.asciidoc

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67134,6 +67134,47 @@ type: long
6713467134

6713567135
--
6713667136

67137+
[float]
67138+
=== datastorecluster
67139+
67140+
Datastore Cluster
67141+
67142+
67143+
67144+
*`vsphere.datastorecluster.name`*::
67145+
+
67146+
--
67147+
The Datastore Cluster name.
67148+
67149+
67150+
type: keyword
67151+
67152+
--
67153+
67154+
*`vsphere.datastorecluster.capacity.bytes`*::
67155+
+
67156+
--
67157+
Total capacity of this storage pod, in bytes.
67158+
67159+
67160+
type: long
67161+
67162+
format: bytes
67163+
67164+
--
67165+
67166+
*`vsphere.datastorecluster.free_space.bytes`*::
67167+
+
67168+
--
67169+
Total free space on this storage pod, in bytes.
67170+
67171+
67172+
type: long
67173+
67174+
format: bytes
67175+
67176+
--
67177+
6713767178
[float]
6713867179
=== host
6713967180

metricbeat/docs/modules/vsphere.asciidoc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This file is generated! See scripts/mage/docs_collector.go
1111

1212
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.
1313

14-
By default it enables the metricsets `cluster`, `network`, `resourcepool`, `datastore`, `host` and `virtualmachine`.
14+
By default it enables the metricsets `cluster`, `datastore`, `datastorecluster`, `host`, `network`, `resourcepool` and `virtualmachine`.
1515

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

5858
* <<metricbeat-metricset-vsphere-datastore,datastore>>
5959

60+
* <<metricbeat-metricset-vsphere-datastorecluster,datastorecluster>>
61+
6062
* <<metricbeat-metricset-vsphere-host,host>>
6163

6264
* <<metricbeat-metricset-vsphere-network,network>>
@@ -69,6 +71,8 @@ include::vsphere/cluster.asciidoc[]
6971

7072
include::vsphere/datastore.asciidoc[]
7173

74+
include::vsphere/datastorecluster.asciidoc[]
75+
7276
include::vsphere/host.asciidoc[]
7377

7478
include::vsphere/network.asciidoc[]
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
////
2+
This file is generated! See scripts/mage/docs_collector.go
3+
////
4+
:edit_url: https://github.com/elastic/beats/edit/main/metricbeat/module/vsphere/datastorecluster/_meta/docs.asciidoc
5+
6+
7+
[[metricbeat-metricset-vsphere-datastorecluster]]
8+
=== vSphere datastorecluster metricset
9+
10+
beta[]
11+
12+
include::../../../module/vsphere/datastorecluster/_meta/docs.asciidoc[]
13+
14+
This is a default metricset. If the host module is unconfigured, this metricset is enabled by default.
15+
16+
:edit_url:
17+
18+
==== Fields
19+
20+
For a description of each field in the metricset, see the
21+
<<exported-fields-vsphere,exported fields>> section.
22+
23+
Here is an example document generated by this metricset:
24+
25+
[source,json]
26+
----
27+
include::../../../module/vsphere/datastorecluster/_meta/data.json[]
28+
----
29+
:edit_url!:

metricbeat/docs/modules_list.asciidoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,9 @@ This file is generated! See scripts/mage/docs_collector.go
311311
|<<metricbeat-module-uwsgi,uWSGI>> |image:./images/icon-yes.png[Prebuilt dashboards are available] |
312312
.1+| .1+| |<<metricbeat-metricset-uwsgi-status,status>>
313313
|<<metricbeat-module-vsphere,vSphere>> |image:./images/icon-yes.png[Prebuilt dashboards are available] |
314-
.6+| .6+| |<<metricbeat-metricset-vsphere-cluster,cluster>> beta[]
314+
.7+| .7+| |<<metricbeat-metricset-vsphere-cluster,cluster>> beta[]
315315
|<<metricbeat-metricset-vsphere-datastore,datastore>>
316+
|<<metricbeat-metricset-vsphere-datastorecluster,datastorecluster>> beta[]
316317
|<<metricbeat-metricset-vsphere-host,host>>
317318
|<<metricbeat-metricset-vsphere-network,network>> beta[]
318319
|<<metricbeat-metricset-vsphere-resourcepool,resourcepool>> beta[]

metricbeat/include/list_common.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

metricbeat/metricbeat.reference.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,7 @@ metricbeat.modules:
10071007
#------------------------------- VSphere Module -------------------------------
10081008
- module: vsphere
10091009
enabled: true
1010-
metricsets: ["cluster", "datastore", "host", "virtualmachine", "network", "resourcepool"]
1010+
metricsets: ["cluster", "datastore", "datastorecluster", "host", "network", "resourcepool", "virtualmachine"]
10111011
# Real-time data collection – An ESXi Server collects data for each performance counter every 20 seconds.
10121012
period: 20s
10131013
hosts: ["https://localhost/sdk"]

metricbeat/module/vsphere/_meta/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Testing using GOVCSIM.
22

33

4-
To test the vsphere module without a real Vmware SDK URL you can use the following setup. Govcsim is a vCenter Server and ESXi API based simulator written using govmomi. It creates a vCenter Server model with a datacenter, hosts, cluster, resource pools, networks and a datastore.
4+
To test the vsphere module without a real Vmware SDK URL you can use the following setup. Govcsim is a vCenter Server and ESXi API based simulator written using govmomi. It creates a vCenter Server model with a datacenter, datastore cluster, hosts, cluster, resource pools, networks and a datastore.
55

66

77
Requirements:
@@ -30,10 +30,11 @@ Now setup your metricbeat config to connect to Govcsim:
3030
metricsets:
3131
- cluster
3232
- datastore
33+
- datastorecluster
3334
- host
34-
- virtualmachine
3535
- network
3636
- resourcepool
37+
- virtualmachine
3738
enabled: true
3839
period: 5s
3940
hosts: ["https://127.0.0.1:8989/sdk"]

metricbeat/module/vsphere/_meta/config.reference.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
- module: vsphere
22
enabled: true
3-
metricsets: ["cluster", "datastore", "host", "virtualmachine", "network", "resourcepool"]
3+
metricsets: ["cluster", "datastore", "datastorecluster", "host", "network", "resourcepool", "virtualmachine"]
44
# Real-time data collection – An ESXi Server collects data for each performance counter every 20 seconds.
55
period: 20s
66
hosts: ["https://localhost/sdk"]

metricbeat/module/vsphere/_meta/config.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
- module: vsphere
2-
#metricsets:
2+
# metricsets:
33
# - cluster
44
# - datastore
5+
# - datastorecluster
56
# - host
6-
# - virtualmachine
77
# - network
88
# - resourcepool
9+
# - virtualmachine
910
# Real-time data collection – An ESXi Server collects data for each performance counter every 20 seconds.
1011
period: 20s
1112
hosts: ["https://localhost/sdk"]

metricbeat/module/vsphere/_meta/docs.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
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.
22

3-
By default it enables the metricsets `cluster`, `network`, `resourcepool`, `datastore`, `host` and `virtualmachine`.
3+
By default it enables the metricsets `cluster`, `datastore`, `datastorecluster`, `host`, `network`, `resourcepool` and `virtualmachine`.
44

55
[float]
66
=== Dashboard

0 commit comments

Comments
 (0)