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][virtualmachine] Add metrics to virtualmachine metricset #40485

Merged
merged 21 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
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 @@ -54,6 +54,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 metrics for the vSphere Virtualmachine metricset. {pull}40485[40485]
- Update metrics for the vSphere Host metricset. {pull}40429[40429]

*Osquerybeat*
Expand Down
74 changes: 37 additions & 37 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24491,6 +24491,43 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


--------------------------------------------------------------------------------
Dependency : golang.org/x/exp
Version: v0.0.0-20240205201215-2c58cdc269a3
Licence type (autodetected): BSD-3-Clause
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/golang.org/x/exp@v0.0.0-20240205201215-2c58cdc269a3/LICENSE:

Copyright (c) 2009 The Go Authors. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


--------------------------------------------------------------------------------
Dependency : golang.org/x/mod
Version: v0.19.0
Expand Down Expand Up @@ -54754,43 +54791,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.


--------------------------------------------------------------------------------
Dependency : golang.org/x/exp
Version: v0.0.0-20240205201215-2c58cdc269a3
Licence type (autodetected): BSD-3-Clause
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/golang.org/x/exp@v0.0.0-20240205201215-2c58cdc269a3/LICENSE:

Copyright (c) 2009 The Go Authors. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


--------------------------------------------------------------------------------
Dependency : golang.org/x/term
Version: v0.22.0
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ require (
go.elastic.co/apm/module/apmhttp/v2 v2.6.0
go.elastic.co/apm/v2 v2.6.0
go.mongodb.org/mongo-driver v1.5.1
golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3
google.golang.org/genproto/googleapis/api v0.0.0-20240725223205-93522f1f2a9f
gopkg.in/natefinch/lumberjack.v2 v2.2.1
)
Expand Down Expand Up @@ -371,7 +372,6 @@ require (
go.opentelemetry.io/otel/metric v1.28.0 // indirect
go.opentelemetry.io/otel/trace v1.28.0 // indirect
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 // indirect
golang.org/x/term v0.22.0 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf // indirect
Expand Down
30 changes: 30 additions & 0 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -67457,6 +67457,36 @@ type: object
Network names


type: keyword

--

*`vsphere.virtualmachine.status`*::
+
--
Overall health and status of a virtual machine


type: keyword

--

*`vsphere.virtualmachine.uptime`*::
+
--
The uptime of the VM in seconds


type: long

--

*`vsphere.virtualmachine.datastore.names`*::
+
--
Datastore names associated with the virtual machine


type: keyword

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

67 changes: 39 additions & 28 deletions metricbeat/module/vsphere/virtualmachine/_meta/data.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"@timestamp": "2017-10-12T08:05:34.853Z",
"@timestamp": "2024-08-12T04:51:25.851Z",
"event": {
"dataset": "vsphere.virtualmachine",
"duration": 115000,
Expand All @@ -15,35 +15,46 @@
},
"vsphere": {
"virtualmachine": {
"cpu": {
"used": {
"mhz": 0
}
"os": "otherGuest",
"memory": {
"used": {
"guest": {
"bytes": 0
},
"host": {
"bytes": 0
}
},
"host.hostname": "localhost.localdomain",
"host.id": "ha-host",
"memory": {
"free": {
"guest": {
"bytes": 33554432
}
},
"total": {
"guest": {
"bytes": 33554432
}
},
"used": {
"guest": {
"bytes": 0
},
"host": {
"bytes": 0
}
}
"total": {
"guest": {
"bytes": 33554432
}
},
"name": "ha-host_VM0",
"os": "otherGuest"
"free": {
"guest": {
"bytes": 33554432
}
}
},
"name": "DC0_C0_RP0_VM1",
"uptime": 0,
"status": "green",
"host.hostname": "DC0_C0_H2",
"cpu": {
"used": {
"mhz": 0
},
"total": {
"mhz": 0
},
"free": {
"mhz": 0
}
},
"datastore_names": [
"LocalDS_0"
],
"host.id": "host-58"
}
}
}
40 changes: 27 additions & 13 deletions metricbeat/module/vsphere/virtualmachine/_meta/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,57 +7,71 @@
- name: host.id
type: keyword
description: >
Host id
Host id.
- name: host.hostname
type: keyword
description: >
Host name of the host
Host name of the host.
ishleenk17 marked this conversation as resolved.
Show resolved Hide resolved
- name: name
type: keyword
description: >
Virtual Machine name
Virtual Machine name.
- name: os
type: keyword
description: >
Virtual Machine Operating System name
Virtual Machine Operating System name.
- name: cpu.used.mhz
type: long
description: >
Used CPU in Mhz
Used CPU in Mhz.
- name: cpu.total.mhz
type: long
description: >
Total CPU in Mhz
Total CPU in Mhz.
- name: cpu.free.mhz
type: long
description: >
Available CPU in Mhz
Available CPU in Mhz.
- name: memory.used.guest.bytes
type: long
description: >
Used Memory of Guest in bytes
Used Memory of Guest in bytes.
format: bytes
- name: memory.used.host.bytes
type: long
description: >
Used Memory of Host in bytes
Used Memory of Host in bytes.
format: bytes
- name: memory.total.guest.bytes
type: long
description: >
Total Memory of Guest in bytes
Total Memory of Guest in bytes.
format: bytes
- name: memory.free.guest.bytes
type: long
description: >
Free Memory of Guest in bytes
Free Memory of Guest in bytes.
format: bytes
- name: custom_fields
type: object
object_type: keyword
description: >
Custom fields
Custom fields.
- name: network_names
ishleenk17 marked this conversation as resolved.
Show resolved Hide resolved
type: keyword
description: >
Network names
Network names.
- name: status
type: keyword
description: >
Overall health and status of a virtual machine.
- name: uptime
type: long
description: >
The uptime of the VM in seconds.
- name: datastore.names
ishleenk17 marked this conversation as resolved.
Show resolved Hide resolved
type: keyword
description: >
Datastore names associated with the virtual machine.


Loading
Loading