Skip to content

Commit 5412666

Browse files
samiuraatoulme
andauthored
Added two new metrics for vcenter receiver (#37253)
<!--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]>
1 parent 3f1d256 commit 5412666

File tree

11 files changed

+288
-0
lines changed

11 files changed

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

receiver/vcenterreceiver/documentation.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,32 @@ The vSAN throughput of a virtual machine.
802802
| ---- | ----------- | ------ |
803803
| direction | The type of vSAN throughput. | Str: ``read``, ``write`` |
804804
805+
## Optional Metrics
806+
807+
The following metrics are not emitted by default. Each of them can be enabled by applying the following configuration:
808+
809+
```yaml
810+
metrics:
811+
<metric_name>:
812+
enabled: true
813+
```
814+
815+
### vcenter.host.memory.capacity
816+
817+
Total memory capacity of the host system.
818+
819+
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
820+
| ---- | ----------- | ---------- | ----------------------- | --------- |
821+
| MiBy | Sum | Double | Cumulative | false |
822+
823+
### vcenter.vm.memory.granted
824+
825+
The amount of memory that is granted to a VM.
826+
827+
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
828+
| ---- | ----------- | ---------- | ----------------------- | --------- |
829+
| MiBy | Sum | Int | Cumulative | false |
830+
805831
## Resource Attributes
806832
807833
| Name | Description | Values | Enabled |

receiver/vcenterreceiver/internal/metadata/generated_config.go

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

Lines changed: 118 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: 34 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)