Skip to content

Commit

Permalink
Added two new metrics for vcenter receiver (#37253)
Browse files Browse the repository at this point in the history
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
This PR adds the vcenter.vm.memory.granted and vcenter.host.cpu.capacity
metric.
More information on this metric can be found
[here](https://docs.vmware.com/en/vRealize-Operations/8.10/com.vmware.vcom.metrics.doc/GUID-41603CD6-453B-4E26-A237-34E733BAB00C.html).

<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#37257 


<!--Describe what testing was performed and which tests were added.-->
#### Testing
The metric was scraped from a test vCenter environment, and golden test
files were updated to reflect the addition of the metric.


<!--Describe the documentation added.-->
#### Documentation
Documentation was updated according to the metadata.yaml


<!--Please delete paragraphs that you did not use before submitting.-->

<img width="959" alt="Screenshot 2025-01-14 at 10 48 02 AM"
src="https://github.com/user-attachments/assets/7c88902f-fe21-4c7d-be17-ba79a92222f3"
/>

<img width="919" alt="Screenshot 2025-01-15 at 11 35 31 AM"
src="https://github.com/user-attachments/assets/77e19e19-93e4-410a-b501-6477c77e78da"
/>

Co-authored-by: Antoine Toulme <[email protected]>
  • Loading branch information
samiura and atoulme authored Jan 18, 2025
1 parent 3f1d256 commit 5412666
Show file tree
Hide file tree
Showing 11 changed files with 288 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .chloggen/add-two-new-vecenter-receiver-metrics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# 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 memory capacity for hosts and memory granted metric for VMs."
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [37257]
# (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]
26 changes: 26 additions & 0 deletions receiver/vcenterreceiver/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,32 @@ The vSAN throughput of a virtual machine.
| ---- | ----------- | ------ |
| direction | The type of vSAN throughput. | Str: ``read``, ``write`` |
## Optional Metrics
The following metrics are not emitted by default. Each of them can be enabled by applying the following configuration:
```yaml
metrics:
<metric_name>:
enabled: true
```
### vcenter.host.memory.capacity
Total memory capacity of the host system.
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| MiBy | Sum | Double | Cumulative | false |
### vcenter.vm.memory.granted
The amount of memory that is granted to a VM.
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| MiBy | Sum | Int | Cumulative | false |
## Resource Attributes
| Name | Description | Values | Enabled |
Expand Down

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.

118 changes: 118 additions & 0 deletions receiver/vcenterreceiver/internal/metadata/generated_metrics.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 5412666

Please sign in to comment.