Skip to content

Commit 2604193

Browse files
authored
[receiver/vcenter] Add vCenter Host metrics (dropped packet rate + capacity) (#33646)
**Description:** <Describe what has changed.> <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> The following PR adds the following metrics ``` vcenter.host.network.packet.drop.rate vcenter.host.cpu.capacity vcenter.host.cpu.reserve.capacity ``` These metrics can be found in the following links respectively: [errorTx and errorRx](https://vdc-repo.vmware.com/vmwb-repository/dcr-public/d1902b0e-d479-46bf-8ac9-cee0e31e8ec0/07ce8dbd-db48-4261-9b8f-c6d3ad8ba472/network_counters.html) [reservedCapacity and totalCapacity](https://vdc-repo.vmware.com/vmwb-repository/dcr-public/d1902b0e-d479-46bf-8ac9-cee0e31e8ec0/07ce8dbd-db48-4261-9b8f-c6d3ad8ba472/cpu_counters.html) **Link to tracking Issue:** #33607 **Testing:** <Describe what testing was performed and which tests were added.> Tested against a live environment to scrape added metrics, and updated golden test files. **Documentation:** <Describe the documentation added.> Updated documentation through mdatagen.
1 parent e4f1a44 commit 2604193

File tree

14 files changed

+776
-5
lines changed

14 files changed

+776
-5
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: enhancement
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: vcenterreceiver
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: "Adds vCenter CPU capacity and network drop rate metrics to hosts."
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [33607]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext:
19+
20+
# If your change doesn't affect end users or the exported elements of any package,
21+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
22+
# Optional: The change log or logs in which this entry should be included.
23+
# e.g. '[user]' or '[user, api]'
24+
# Include 'user' if the change is relevant to end users.
25+
# Include 'api' if there is a change to a library API.
26+
# Default: '[user]'
27+
change_logs: [user]

go.mod

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ module github.com/open-telemetry/opentelemetry-collector-contrib
1010

1111
go 1.21.0
1212

13+
// Replace references to modules that are in this repository with their relateive paths
14+
// so that we always build with current (latest) version of the source code.
15+
1316
// see https://github.com/google/gnostic/issues/262
1417
replace github.com/googleapis/gnostic v0.5.6 => github.com/googleapis/gnostic v0.5.5
1518

receiver/vcenterreceiver/documentation.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,45 @@ metrics:
487487
enabled: true
488488
```
489489
490+
### vcenter.host.cpu.capacity
491+
492+
Total CPU capacity of the host system.
493+
494+
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
495+
| ---- | ----------- | ---------- | ----------------------- | --------- |
496+
| MHz | Sum | Int | Cumulative | false |
497+
498+
### vcenter.host.cpu.reserved
499+
500+
The CPU of the host reserved for use by virtual machines.
501+
502+
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
503+
| ---- | ----------- | ---------- | ----------------------- | --------- |
504+
| MHz | Sum | Int | Cumulative | false |
505+
506+
#### Attributes
507+
508+
| Name | Description | Values |
509+
| ---- | ----------- | ------ |
510+
| cpu_reservation_type | The type of CPU reservation for the host. | Str: ``total``, ``used`` |
511+
512+
### vcenter.host.network.packet.drop.rate
513+
514+
The rate of packets dropped across each physical NIC (network interface controller) instance on the host.
515+
516+
As measured over the most recent 20s interval.
517+
518+
| Unit | Metric Type | Value Type |
519+
| ---- | ----------- | ---------- |
520+
| {packets/sec} | Gauge | Double |
521+
522+
#### Attributes
523+
524+
| Name | Description | Values |
525+
| ---- | ----------- | ------ |
526+
| direction | The direction of network throughput. | Str: ``transmitted``, ``received`` |
527+
| object | The object on the virtual machine or host that is being reported on. | Any Str |
528+
490529
### vcenter.vm.cpu.readiness
491530
492531
Percentage of time that the virtual machine was ready, but could not get scheduled to run on the physical CPU.

receiver/vcenterreceiver/internal/metadata/generated_config.go

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

receiver/vcenterreceiver/internal/metadata/generated_config_test.go

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

0 commit comments

Comments
 (0)