Skip to content

Commit

Permalink
[receiver/vcenter] Add vCenter Host metrics (dropped packet rate + ca…
Browse files Browse the repository at this point in the history
…pacity) (#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.
  • Loading branch information
BominRahmani authored Jul 1, 2024
1 parent e4f1a44 commit 2604193
Show file tree
Hide file tree
Showing 14 changed files with 776 additions and 5 deletions.
27 changes: 27 additions & 0 deletions .chloggen/vcenter_add_host_metrics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: vcenterreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: "Adds vCenter CPU capacity and network drop rate metrics to hosts."

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [33607]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:

# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: [user]
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ module github.com/open-telemetry/opentelemetry-collector-contrib

go 1.21.0

// Replace references to modules that are in this repository with their relateive paths
// so that we always build with current (latest) version of the source code.

// see https://github.com/google/gnostic/issues/262
replace github.com/googleapis/gnostic v0.5.6 => github.com/googleapis/gnostic v0.5.5

Expand Down
39 changes: 39 additions & 0 deletions receiver/vcenterreceiver/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,45 @@ metrics:
enabled: true
```
### vcenter.host.cpu.capacity
Total CPU capacity of the host system.
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| MHz | Sum | Int | Cumulative | false |
### vcenter.host.cpu.reserved
The CPU of the host reserved for use by virtual machines.
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| MHz | Sum | Int | Cumulative | false |
#### Attributes
| Name | Description | Values |
| ---- | ----------- | ------ |
| cpu_reservation_type | The type of CPU reservation for the host. | Str: ``total``, ``used`` |
### vcenter.host.network.packet.drop.rate
The rate of packets dropped across each physical NIC (network interface controller) instance on the host.
As measured over the most recent 20s interval.
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| {packets/sec} | Gauge | Double |
#### Attributes
| Name | Description | Values |
| ---- | ----------- | ------ |
| direction | The direction of network throughput. | Str: ``transmitted``, ``received`` |
| object | The object on the virtual machine or host that is being reported on. | Any Str |
### vcenter.vm.cpu.readiness
Percentage of time that the virtual machine was ready, but could not get scheduled to run on the physical CPU.
Expand Down
12 changes: 12 additions & 0 deletions receiver/vcenterreceiver/internal/metadata/generated_config.go

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

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

Loading

0 comments on commit 2604193

Please sign in to comment.