Skip to content

Commit debd148

Browse files
authored
Enable vSphere CPU and host metrics by default (#34022)
**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 enables the following metrics by default ``` vcenter.vm.cpu.readiness vcenter.host.network.packet.drop.rate vcenter.host.cpu.capacity vcenter.host.cpu.reserve.capacity ``` **Link to tracking Issue:** <Issue number if applicable> **Testing:** <Describe what testing was performed and which tests were added.> Updated golden files **Documentation:** <Describe the documentation added.> Updated documentation using make generate
1 parent 6ed999b commit debd148

File tree

11 files changed

+783
-96
lines changed

11 files changed

+783
-96
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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: "Enables various vCenter metrics that were disabled by default until v0.105"
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: [34022]
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+
The following metrics will be enabled by default "vcenter.host.network.packet.drop.rate",
20+
"vcenter.vm.cpu.readiness", "vcenter.host.cpu.capacity", and "vcenter.host.cpu.reserved".
21+
22+
# If your change doesn't affect end users or the exported elements of any package,
23+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
24+
# Optional: The change log or logs in which this entry should be included.
25+
# e.g. '[user]' or '[user, api]'
26+
# Include 'user' if the change is relevant to end users.
27+
# Include 'api' if there is a change to a library API.
28+
# Default: '[user]'
29+
change_logs: [user]

receiver/vcenterreceiver/documentation.md

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,28 @@ The utilization of the datastore.
104104
| ---- | ----------- | ---------- |
105105
| % | Gauge | Double |
106106
107+
### vcenter.host.cpu.capacity
108+
109+
Total CPU capacity of the host system.
110+
111+
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
112+
| ---- | ----------- | ---------- | ----------------------- | --------- |
113+
| MHz | Sum | Int | Cumulative | false |
114+
115+
### vcenter.host.cpu.reserved
116+
117+
The CPU of the host reserved for use by virtual machines.
118+
119+
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
120+
| ---- | ----------- | ---------- | ----------------------- | --------- |
121+
| MHz | Sum | Int | Cumulative | false |
122+
123+
#### Attributes
124+
125+
| Name | Description | Values |
126+
| ---- | ----------- | ------ |
127+
| cpu_reservation_type | The type of CPU reservation for the host. | Str: ``total``, ``used`` |
128+
107129
### vcenter.host.cpu.usage
108130
109131
The amount of CPU used by the host.
@@ -186,6 +208,23 @@ The percentage of the host system's memory capacity that is being utilized.
186208
| ---- | ----------- | ---------- |
187209
| % | Gauge | Double |
188210
211+
### vcenter.host.network.packet.drop.rate
212+
213+
The rate of packets dropped across each physical NIC (network interface controller) instance on the host.
214+
215+
As measured over the most recent 20s interval.
216+
217+
| Unit | Metric Type | Value Type |
218+
| ---- | ----------- | ---------- |
219+
| {packets/sec} | Gauge | Double |
220+
221+
#### Attributes
222+
223+
| Name | Description | Values |
224+
| ---- | ----------- | ------ |
225+
| direction | The direction of network throughput. | Str: ``transmitted``, ``received`` |
226+
| object | The object on the virtual machine or host that is being reported on. | Any Str |
227+
189228
### vcenter.host.network.packet.error.rate
190229
191230
The rate of packet errors transmitted or received on the host network.
@@ -289,6 +328,14 @@ The usage of the memory by the resource pool.
289328
| ---- | ----------- | ------ |
290329
| type | The type of memory usage. | Str: ``guest``, ``host``, ``overhead`` |
291330
331+
### vcenter.vm.cpu.readiness
332+
333+
Percentage of time that the virtual machine was ready, but could not get scheduled to run on the physical CPU.
334+
335+
| Unit | Metric Type | Value Type |
336+
| ---- | ----------- | ---------- |
337+
| % | Gauge | Int |
338+
292339
### vcenter.vm.cpu.usage
293340
294341
The amount of CPU used by the VM.
@@ -575,45 +622,6 @@ The number of VM's in the datacenter.
575622
| status | The current status of the managed entity. | Str: ``red``, ``yellow``, ``green``, ``gray`` |
576623
| power_state | The current power state of the virtual machine. | Str: ``on``, ``off``, ``suspended``, ``unknown`` |
577624
578-
### vcenter.host.cpu.capacity
579-
580-
Total CPU capacity of the host system.
581-
582-
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
583-
| ---- | ----------- | ---------- | ----------------------- | --------- |
584-
| MHz | Sum | Int | Cumulative | false |
585-
586-
### vcenter.host.cpu.reserved
587-
588-
The CPU of the host reserved for use by virtual machines.
589-
590-
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
591-
| ---- | ----------- | ---------- | ----------------------- | --------- |
592-
| MHz | Sum | Int | Cumulative | false |
593-
594-
#### Attributes
595-
596-
| Name | Description | Values |
597-
| ---- | ----------- | ------ |
598-
| cpu_reservation_type | The type of CPU reservation for the host. | Str: ``total``, ``used`` |
599-
600-
### vcenter.host.network.packet.drop.rate
601-
602-
The rate of packets dropped across each physical NIC (network interface controller) instance on the host.
603-
604-
As measured over the most recent 20s interval.
605-
606-
| Unit | Metric Type | Value Type |
607-
| ---- | ----------- | ---------- |
608-
| {packets/sec} | Gauge | Double |
609-
610-
#### Attributes
611-
612-
| Name | Description | Values |
613-
| ---- | ----------- | ------ |
614-
| direction | The direction of network throughput. | Str: ``transmitted``, ``received`` |
615-
| object | The object on the virtual machine or host that is being reported on. | Any Str |
616-
617625
### vcenter.resource_pool.memory.ballooned
618626
619627
The amount of memory in a resource pool that is ballooned due to virtualization.
@@ -644,14 +652,6 @@ The amount of memory that is granted to VMs in the resource pool from the host's
644652
| ---- | ----------- | ---------- | ----------------------- | --------- |
645653
| MiBy | Sum | Int | Cumulative | false |
646654
647-
### vcenter.vm.cpu.readiness
648-
649-
Percentage of time that the virtual machine was ready, but could not get scheduled to run on the physical CPU.
650-
651-
| Unit | Metric Type | Value Type |
652-
| ---- | ----------- | ---------- |
653-
| % | Gauge | Int |
654-
655655
## Resource Attributes
656656
657657
| Name | Description | Values | Enabled |

receiver/vcenterreceiver/internal/metadata/generated_config.go

Lines changed: 4 additions & 4 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: 0 additions & 12 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: 4 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

receiver/vcenterreceiver/internal/mockserver/responses/host-performance-counters.xml

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,28 @@
469469
<value>0</value>
470470
<value>0</value>
471471
</value>
472+
<value xsi:type="PerfMetricIntSeries">
473+
<id>
474+
<counterId>529</counterId>
475+
<instance>vmnic0</instance>
476+
</id>
477+
<value>0</value>
478+
<value>0</value>
479+
<value>0</value>
480+
<value>0</value>
481+
<value>0</value>
482+
</value>
483+
<value xsi:type="PerfMetricIntSeries">
484+
<id>
485+
<counterId>530</counterId>
486+
<instance>vmnic0</instance>
487+
</id>
488+
<value>0</value>
489+
<value>0</value>
490+
<value>0</value>
491+
<value>0</value>
492+
<value>0</value>
493+
</value>
472494
<value xsi:type="PerfMetricIntSeries">
473495
<id>
474496
<counterId>146</counterId>
@@ -1459,7 +1481,7 @@
14591481
<value>1646</value>
14601482
<value>1291</value>
14611483
<value>1058</value>
1462-
</value>
1484+
</value>
14631485
<value xsi:type="PerfMetricIntSeries">
14641486
<id>
14651487
<counterId>435</counterId>
@@ -1559,6 +1581,28 @@
15591581
<value>0</value>
15601582
<value>0</value>
15611583
</value>
1584+
<value xsi:type="PerfMetricIntSeries">
1585+
<id>
1586+
<counterId>529</counterId>
1587+
<instance>vmnic2</instance>
1588+
</id>
1589+
<value>0</value>
1590+
<value>0</value>
1591+
<value>0</value>
1592+
<value>0</value>
1593+
<value>0</value>
1594+
</value>
1595+
<value xsi:type="PerfMetricIntSeries">
1596+
<id>
1597+
<counterId>530</counterId>
1598+
<instance>vmnic2</instance>
1599+
</id>
1600+
<value>0</value>
1601+
<value>0</value>
1602+
<value>0</value>
1603+
<value>0</value>
1604+
<value>0</value>
1605+
</value>
15621606
<value xsi:type="PerfMetricIntSeries">
15631607
<id>
15641608
<counterId>147</counterId>

0 commit comments

Comments
 (0)