Skip to content

Commit 0e9dde7

Browse files
authored
[receiver/vcenter] Adds vCenter VM CPU readiness metric (#33608)
**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.--> This PR adds the `vcenter.vm.cpu.readiness` metric. More information on this metric can be found [here](https://vdc-repo.vmware.com/vmwb-repository/dcr-public/d1902b0e-d479-46bf-8ac9-cee0e31e8ec0/07ce8dbd-db48-4261-9b8f-c6d3ad8ba472/vim.vm.Summary.QuickStats.html). **Link to tracking Issue:** #33607 **Testing:** <Describe what testing was performed and which tests were added.> The metric was scraped from a test vCenter environment, and golden test files were updated to reflect the addition of the metric. **Documentation:** <Describe the documentation added.> Documentation was updated according to the metadata.yaml
1 parent c3f6645 commit 0e9dde7

13 files changed

+199
-1
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 readiness metric for VMs."
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]
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: breaking
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: "Drops support for vCenter 6.7"
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]

receiver/vcenterreceiver/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ This receiver has been built to support ESXi and vCenter versions:
2020

2121
- 8
2222
- 7.0
23-
- 6.7
2423

2524
A “Read Only” user assigned to a vSphere with permissions to the vCenter server, cluster and all subsequent resources being monitored must be specified in order for the receiver to retrieve information about them.
2625

receiver/vcenterreceiver/documentation.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,24 @@ As measured over the most recent 20s interval.
477477
| ---- | ----------- | ------ |
478478
| object | The object on the virtual machine or host that is being reported on. | Any Str |
479479
480+
## Optional Metrics
481+
482+
The following metrics are not emitted by default. Each of them can be enabled by applying the following configuration:
483+
484+
```yaml
485+
metrics:
486+
<metric_name>:
487+
enabled: true
488+
```
489+
490+
### vcenter.vm.cpu.readiness
491+
492+
Percentage of time that the virtual machine was ready, but could not get scheduled to run on the physical CPU.
493+
494+
| Unit | Metric Type | Value Type |
495+
| ---- | ----------- | ---------- |
496+
| % | Gauge | Int |
497+
480498
## Resource Attributes
481499
482500
| Name | Description | Values | Enabled |

receiver/vcenterreceiver/internal/metadata/generated_config.go

Lines changed: 4 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: 2 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_metrics.go

Lines changed: 60 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_metrics_test.go

Lines changed: 19 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/testdata/config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ all_set:
4949
enabled: true
5050
vcenter.resource_pool.memory.usage:
5151
enabled: true
52+
vcenter.vm.cpu.readiness:
53+
enabled: true
5254
vcenter.vm.cpu.usage:
5355
enabled: true
5456
vcenter.vm.cpu.utilization:
@@ -156,6 +158,8 @@ none_set:
156158
enabled: false
157159
vcenter.resource_pool.memory.usage:
158160
enabled: false
161+
vcenter.vm.cpu.readiness:
162+
enabled: false
159163
vcenter.vm.cpu.usage:
160164
enabled: false
161165
vcenter.vm.cpu.utilization:

receiver/vcenterreceiver/metadata.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,15 @@ metrics:
441441
value_type: int
442442
aggregation_temporality: cumulative
443443
attributes: []
444+
vcenter.vm.cpu.readiness:
445+
enabled: false
446+
description: Percentage of time that the virtual machine was ready, but could not get scheduled to run on the physical CPU.
447+
unit: "%"
448+
gauge:
449+
value_type: int
450+
attributes: []
451+
warnings:
452+
if_enabled_not_set: "this metric will be enabled by default starting in release v0.105.0"
444453
vcenter.vm.memory.utilization:
445454
enabled: true
446455
description: The memory utilization of the VM.

0 commit comments

Comments
 (0)