diff --git a/.chloggen/update_vcenter_host_vm_metrics_to_default.yaml b/.chloggen/update_vcenter_host_vm_metrics_to_default.yaml new file mode 100644 index 000000000000..f9075f147658 --- /dev/null +++ b/.chloggen/update_vcenter_host_vm_metrics_to_default.yaml @@ -0,0 +1,29 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: breaking + +# 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: "Enables various vCenter metrics that were disabled by default until v0.105" + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [34022] + +# (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: | + The following metrics will be enabled by default "vcenter.host.network.packet.drop.rate", + "vcenter.vm.cpu.readiness", "vcenter.host.cpu.capacity", and "vcenter.host.cpu.reserved". + +# 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] diff --git a/receiver/vcenterreceiver/documentation.md b/receiver/vcenterreceiver/documentation.md index 87717326cbe8..53efcfcdab9d 100644 --- a/receiver/vcenterreceiver/documentation.md +++ b/receiver/vcenterreceiver/documentation.md @@ -104,6 +104,28 @@ The utilization of the datastore. | ---- | ----------- | ---------- | | % | Gauge | Double | +### 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.cpu.usage 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. | ---- | ----------- | ---------- | | % | Gauge | Double | +### 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.host.network.packet.error.rate 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. | ---- | ----------- | ------ | | type | The type of memory usage. | Str: ``guest``, ``host``, ``overhead`` | +### vcenter.vm.cpu.readiness + +Percentage of time that the virtual machine was ready, but could not get scheduled to run on the physical CPU. + +| Unit | Metric Type | Value Type | +| ---- | ----------- | ---------- | +| % | Gauge | Int | + ### vcenter.vm.cpu.usage The amount of CPU used by the VM. @@ -575,45 +622,6 @@ The number of VM's in the datacenter. | status | The current status of the managed entity. | Str: ``red``, ``yellow``, ``green``, ``gray`` | | power_state | The current power state of the virtual machine. | Str: ``on``, ``off``, ``suspended``, ``unknown`` | -### 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.resource_pool.memory.ballooned 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 | ---- | ----------- | ---------- | ----------------------- | --------- | | MiBy | Sum | Int | Cumulative | false | -### vcenter.vm.cpu.readiness - -Percentage of time that the virtual machine was ready, but could not get scheduled to run on the physical CPU. - -| Unit | Metric Type | Value Type | -| ---- | ----------- | ---------- | -| % | Gauge | Int | - ## Resource Attributes | Name | Description | Values | Enabled | diff --git a/receiver/vcenterreceiver/internal/metadata/generated_config.go b/receiver/vcenterreceiver/internal/metadata/generated_config.go index 92ed3650ad50..f7717e2e960a 100644 --- a/receiver/vcenterreceiver/internal/metadata/generated_config.go +++ b/receiver/vcenterreceiver/internal/metadata/generated_config.go @@ -135,10 +135,10 @@ func DefaultMetricsConfig() MetricsConfig { Enabled: true, }, VcenterHostCPUCapacity: MetricConfig{ - Enabled: false, + Enabled: true, }, VcenterHostCPUReserved: MetricConfig{ - Enabled: false, + Enabled: true, }, VcenterHostCPUUsage: MetricConfig{ Enabled: true, @@ -162,7 +162,7 @@ func DefaultMetricsConfig() MetricsConfig { Enabled: true, }, VcenterHostNetworkPacketDropRate: MetricConfig{ - Enabled: false, + Enabled: true, }, VcenterHostNetworkPacketErrorRate: MetricConfig{ Enabled: true, @@ -198,7 +198,7 @@ func DefaultMetricsConfig() MetricsConfig { Enabled: true, }, VcenterVMCPUReadiness: MetricConfig{ - Enabled: false, + Enabled: true, }, VcenterVMCPUUsage: MetricConfig{ Enabled: true, diff --git a/receiver/vcenterreceiver/internal/metadata/generated_metrics.go b/receiver/vcenterreceiver/internal/metadata/generated_metrics.go index 0409067cf341..79643aae3775 100644 --- a/receiver/vcenterreceiver/internal/metadata/generated_metrics.go +++ b/receiver/vcenterreceiver/internal/metadata/generated_metrics.go @@ -3184,15 +3184,6 @@ func NewMetricsBuilder(mbc MetricsBuilderConfig, settings receiver.Settings, opt if !mbc.Metrics.VcenterDatacenterVMCount.enabledSetByUser { settings.Logger.Warn("[WARNING] Please set `enabled` field explicitly for `vcenter.datacenter.vm.count`: this metric will be enabled by default starting in release v0.106.0") } - if !mbc.Metrics.VcenterHostCPUCapacity.enabledSetByUser { - settings.Logger.Warn("[WARNING] Please set `enabled` field explicitly for `vcenter.host.cpu.capacity`: this metric will be enabled by default starting in release v0.105.0") - } - if !mbc.Metrics.VcenterHostCPUReserved.enabledSetByUser { - settings.Logger.Warn("[WARNING] Please set `enabled` field explicitly for `vcenter.host.cpu.reserved`: this metric will be enabled by default starting in release v0.105.0") - } - if !mbc.Metrics.VcenterHostNetworkPacketDropRate.enabledSetByUser { - settings.Logger.Warn("[WARNING] Please set `enabled` field explicitly for `vcenter.host.network.packet.drop.rate`: this metric will be enabled by default starting in release v0.105.0") - } if !mbc.Metrics.VcenterResourcePoolMemoryBallooned.enabledSetByUser { settings.Logger.Warn("[WARNING] Please set `enabled` field explicitly for `vcenter.resource_pool.memory.ballooned`: this metric will be enabled by default starting in release v0.106.0") } @@ -3202,9 +3193,6 @@ func NewMetricsBuilder(mbc MetricsBuilderConfig, settings receiver.Settings, opt if !mbc.Metrics.VcenterResourcePoolMemorySwapped.enabledSetByUser { settings.Logger.Warn("[WARNING] Please set `enabled` field explicitly for `vcenter.resource_pool.memory.swapped`: this metric will be enabled by default starting in release v0.106.0") } - if !mbc.Metrics.VcenterVMCPUReadiness.enabledSetByUser { - settings.Logger.Warn("[WARNING] Please set `enabled` field explicitly for `vcenter.vm.cpu.readiness`: this metric will be enabled by default starting in release v0.105.0") - } mb := &MetricsBuilder{ config: mbc, startTime: pcommon.NewTimestampFromTime(time.Now()), diff --git a/receiver/vcenterreceiver/internal/metadata/generated_metrics_test.go b/receiver/vcenterreceiver/internal/metadata/generated_metrics_test.go index 4934aaa6d594..9232eeaf908e 100644 --- a/receiver/vcenterreceiver/internal/metadata/generated_metrics_test.go +++ b/receiver/vcenterreceiver/internal/metadata/generated_metrics_test.go @@ -90,18 +90,6 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, "[WARNING] Please set `enabled` field explicitly for `vcenter.datacenter.vm.count`: this metric will be enabled by default starting in release v0.106.0", observedLogs.All()[expectedWarnings].Message) expectedWarnings++ } - if test.metricsSet == testDataSetDefault { - assert.Equal(t, "[WARNING] Please set `enabled` field explicitly for `vcenter.host.cpu.capacity`: this metric will be enabled by default starting in release v0.105.0", observedLogs.All()[expectedWarnings].Message) - expectedWarnings++ - } - if test.metricsSet == testDataSetDefault { - assert.Equal(t, "[WARNING] Please set `enabled` field explicitly for `vcenter.host.cpu.reserved`: this metric will be enabled by default starting in release v0.105.0", observedLogs.All()[expectedWarnings].Message) - expectedWarnings++ - } - if test.metricsSet == testDataSetDefault { - assert.Equal(t, "[WARNING] Please set `enabled` field explicitly for `vcenter.host.network.packet.drop.rate`: this metric will be enabled by default starting in release v0.105.0", observedLogs.All()[expectedWarnings].Message) - expectedWarnings++ - } if test.metricsSet == testDataSetDefault { assert.Equal(t, "[WARNING] Please set `enabled` field explicitly for `vcenter.resource_pool.memory.ballooned`: this metric will be enabled by default starting in release v0.106.0", observedLogs.All()[expectedWarnings].Message) expectedWarnings++ @@ -114,10 +102,6 @@ func TestMetricsBuilder(t *testing.T) { assert.Equal(t, "[WARNING] Please set `enabled` field explicitly for `vcenter.resource_pool.memory.swapped`: this metric will be enabled by default starting in release v0.106.0", observedLogs.All()[expectedWarnings].Message) expectedWarnings++ } - if test.metricsSet == testDataSetDefault { - assert.Equal(t, "[WARNING] Please set `enabled` field explicitly for `vcenter.vm.cpu.readiness`: this metric will be enabled by default starting in release v0.105.0", observedLogs.All()[expectedWarnings].Message) - expectedWarnings++ - } assert.Equal(t, expectedWarnings, observedLogs.Len()) @@ -181,9 +165,11 @@ func TestMetricsBuilder(t *testing.T) { allMetricsCount++ mb.RecordVcenterDatastoreDiskUtilizationDataPoint(ts, 1) + defaultMetricsCount++ allMetricsCount++ mb.RecordVcenterHostCPUCapacityDataPoint(ts, 1) + defaultMetricsCount++ allMetricsCount++ mb.RecordVcenterHostCPUReservedDataPoint(ts, 1, AttributeCPUReservationTypeTotal) @@ -215,6 +201,7 @@ func TestMetricsBuilder(t *testing.T) { allMetricsCount++ mb.RecordVcenterHostMemoryUtilizationDataPoint(ts, 1) + defaultMetricsCount++ allMetricsCount++ mb.RecordVcenterHostNetworkPacketDropRateDataPoint(ts, 1, AttributeThroughputDirectionTransmitted, "object_name-val") @@ -259,6 +246,7 @@ func TestMetricsBuilder(t *testing.T) { allMetricsCount++ mb.RecordVcenterResourcePoolMemoryUsageDataPoint(ts, 1, AttributeMemoryUsageTypeGuest) + defaultMetricsCount++ allMetricsCount++ mb.RecordVcenterVMCPUReadinessDataPoint(ts, 1) diff --git a/receiver/vcenterreceiver/internal/mockserver/responses/host-performance-counters.xml b/receiver/vcenterreceiver/internal/mockserver/responses/host-performance-counters.xml index 1a582d800a0b..0ffbeff998bb 100644 --- a/receiver/vcenterreceiver/internal/mockserver/responses/host-performance-counters.xml +++ b/receiver/vcenterreceiver/internal/mockserver/responses/host-performance-counters.xml @@ -469,6 +469,28 @@ 0 0 + + + 529 + vmnic0 + + 0 + 0 + 0 + 0 + 0 + + + + 530 + vmnic0 + + 0 + 0 + 0 + 0 + 0 + 146 @@ -1459,7 +1481,7 @@ 1646 1291 1058 - + 435 @@ -1559,6 +1581,28 @@ 0 0 + + + 529 + vmnic2 + + 0 + 0 + 0 + 0 + 0 + + + + 530 + vmnic2 + + 0 + 0 + 0 + 0 + 0 + 147 diff --git a/receiver/vcenterreceiver/metadata.yaml b/receiver/vcenterreceiver/metadata.yaml index d748144b34c7..566fd9a7125f 100644 --- a/receiver/vcenterreceiver/metadata.yaml +++ b/receiver/vcenterreceiver/metadata.yaml @@ -319,7 +319,7 @@ metrics: aggregation_temporality: cumulative attributes: [] vcenter.host.cpu.capacity: - enabled: false + enabled: true description: Total CPU capacity of the host system. unit: "MHz" sum: @@ -327,10 +327,8 @@ metrics: value_type: int aggregation_temporality: cumulative attributes: [] - warnings: - if_enabled_not_set: "this metric will be enabled by default starting in release v0.105.0" vcenter.host.cpu.reserved: - enabled: false + enabled: true description: The CPU of the host reserved for use by virtual machines. unit: "MHz" sum: @@ -338,8 +336,6 @@ metrics: value_type: int aggregation_temporality: cumulative attributes: [cpu_reservation_type] - warnings: - if_enabled_not_set: "this metric will be enabled by default starting in release v0.105.0" vcenter.host.disk.throughput: enabled: true description: Average number of kilobytes read from or written to the disk each second. @@ -418,15 +414,13 @@ metrics: attributes: [throughput_direction, object_name] extended_documentation: As measured over the most recent 20s interval. vcenter.host.network.packet.drop.rate: - enabled: false + enabled: true description: The rate of packets dropped across each physical NIC (network interface controller) instance on the host. unit: "{packets/sec}" gauge: value_type: double attributes: [throughput_direction, object_name] extended_documentation: As measured over the most recent 20s interval. - warnings: - if_enabled_not_set: "this metric will be enabled by default starting in release v0.105.0" vcenter.resource_pool.memory.usage: enabled: true description: The usage of the memory by the resource pool. @@ -624,14 +618,12 @@ metrics: aggregation_temporality: cumulative attributes: [] vcenter.vm.cpu.readiness: - enabled: false + enabled: true description: Percentage of time that the virtual machine was ready, but could not get scheduled to run on the physical CPU. unit: "%" gauge: value_type: int attributes: [] - warnings: - if_enabled_not_set: "this metric will be enabled by default starting in release v0.105.0" vcenter.vm.memory.utilization: enabled: true description: The memory utilization of the VM. diff --git a/receiver/vcenterreceiver/scraper_test.go b/receiver/vcenterreceiver/scraper_test.go index 4a5fe26921d9..e9e07984280c 100644 --- a/receiver/vcenterreceiver/scraper_test.go +++ b/receiver/vcenterreceiver/scraper_test.go @@ -40,10 +40,6 @@ func TestScrapeConfigsEnabled(t *testing.T) { defer mockServer.Close() optConfigs := metadata.DefaultMetricsBuilderConfig() - optConfigs.Metrics.VcenterVMCPUReadiness.Enabled = true - optConfigs.Metrics.VcenterHostCPUCapacity.Enabled = true - optConfigs.Metrics.VcenterHostCPUReserved.Enabled = true - optConfigs.Metrics.VcenterHostNetworkPacketDropRate.Enabled = true setResourcePoolMemoryUsageAttrFeatureGate(t, true) optConfigs.Metrics.VcenterResourcePoolMemorySwapped.Enabled = true optConfigs.Metrics.VcenterResourcePoolMemoryBallooned.Enabled = true diff --git a/receiver/vcenterreceiver/testdata/integration/expected.yaml b/receiver/vcenterreceiver/testdata/integration/expected.yaml index 7542d529967f..e2ae90b2adeb 100644 --- a/receiver/vcenterreceiver/testdata/integration/expected.yaml +++ b/receiver/vcenterreceiver/testdata/integration/expected.yaml @@ -83,6 +83,15 @@ resourceMetrics: stringValue: DC0_H0 scopeMetrics: - metrics: + - description: Total CPU capacity of the host system. + name: vcenter.host.cpu.capacity + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "67" + startTimeUnixNano: "1707407684042820000" + timeUnixNano: "1707407733803628000" + unit: MHz - description: The amount of CPU used by the host. name: vcenter.host.cpu.usage sum: @@ -352,6 +361,15 @@ resourceMetrics: stringValue: DC0_C0 scopeMetrics: - metrics: + - description: Total CPU capacity of the host system. + name: vcenter.host.cpu.capacity + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "67" + startTimeUnixNano: "1707407684042820000" + timeUnixNano: "1707407733803628000" + unit: MHz - description: The amount of CPU used by the host. name: vcenter.host.cpu.usage sum: @@ -402,6 +420,15 @@ resourceMetrics: stringValue: DC0_C0 scopeMetrics: - metrics: + - description: Total CPU capacity of the host system. + name: vcenter.host.cpu.capacity + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "67" + startTimeUnixNano: "1707407684042820000" + timeUnixNano: "1707407733803628000" + unit: MHz - description: The amount of CPU used by the host. name: vcenter.host.cpu.usage sum: @@ -452,6 +479,15 @@ resourceMetrics: stringValue: DC0_C0 scopeMetrics: - metrics: + - description: Total CPU capacity of the host system. + name: vcenter.host.cpu.capacity + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "67" + startTimeUnixNano: "1707407684042820000" + timeUnixNano: "1707407733803628000" + unit: MHz - description: The amount of CPU used by the host. name: vcenter.host.cpu.usage sum: diff --git a/receiver/vcenterreceiver/testdata/metrics/expected-all-enabled.yaml b/receiver/vcenterreceiver/testdata/metrics/expected-all-enabled.yaml index ffe7e7ef2ceb..049f2670486c 100644 --- a/receiver/vcenterreceiver/testdata/metrics/expected-all-enabled.yaml +++ b/receiver/vcenterreceiver/testdata/metrics/expected-all-enabled.yaml @@ -1108,6 +1108,111 @@ resourceMetrics: timeUnixNano: "2000000" name: vcenter.host.memory.utilization unit: '%' + - description: The rate of packets dropped across each physical NIC (network interface controller) instance on the host. + gauge: + dataPoints: + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: received + - key: object + value: + stringValue: vmnic2 + startTimeUnixNano: "6000000" + timeUnixNano: "1000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: received + - key: object + value: + stringValue: vmnic2 + startTimeUnixNano: "6000000" + timeUnixNano: "2000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: received + - key: object + value: + stringValue: vmnic2 + startTimeUnixNano: "6000000" + timeUnixNano: "3000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: received + - key: object + value: + stringValue: vmnic2 + startTimeUnixNano: "6000000" + timeUnixNano: "4000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: received + - key: object + value: + stringValue: vmnic2 + startTimeUnixNano: "6000000" + timeUnixNano: "5000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: transmitted + - key: object + value: + stringValue: vmnic2 + startTimeUnixNano: "6000000" + timeUnixNano: "1000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: transmitted + - key: object + value: + stringValue: vmnic2 + startTimeUnixNano: "6000000" + timeUnixNano: "2000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: transmitted + - key: object + value: + stringValue: vmnic2 + startTimeUnixNano: "6000000" + timeUnixNano: "3000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: transmitted + - key: object + value: + stringValue: vmnic2 + startTimeUnixNano: "6000000" + timeUnixNano: "4000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: transmitted + - key: object + value: + stringValue: vmnic2 + startTimeUnixNano: "6000000" + timeUnixNano: "5000000" + name: vcenter.host.network.packet.drop.rate + unit: '{packets/sec}' - description: The rate of packet errors transmitted or received on the host network. gauge: dataPoints: @@ -3641,6 +3746,111 @@ resourceMetrics: timeUnixNano: "2000000" name: vcenter.host.memory.utilization unit: '%' + - description: The rate of packets dropped across each physical NIC (network interface controller) instance on the host. + gauge: + dataPoints: + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: received + - key: object + value: + stringValue: vmnic0 + startTimeUnixNano: "6000000" + timeUnixNano: "1000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: received + - key: object + value: + stringValue: vmnic0 + startTimeUnixNano: "6000000" + timeUnixNano: "2000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: received + - key: object + value: + stringValue: vmnic0 + startTimeUnixNano: "6000000" + timeUnixNano: "3000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: received + - key: object + value: + stringValue: vmnic0 + startTimeUnixNano: "6000000" + timeUnixNano: "4000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: received + - key: object + value: + stringValue: vmnic0 + startTimeUnixNano: "6000000" + timeUnixNano: "5000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: transmitted + - key: object + value: + stringValue: vmnic0 + startTimeUnixNano: "6000000" + timeUnixNano: "1000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: transmitted + - key: object + value: + stringValue: vmnic0 + startTimeUnixNano: "6000000" + timeUnixNano: "2000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: transmitted + - key: object + value: + stringValue: vmnic0 + startTimeUnixNano: "6000000" + timeUnixNano: "3000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: transmitted + - key: object + value: + stringValue: vmnic0 + startTimeUnixNano: "6000000" + timeUnixNano: "4000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: transmitted + - key: object + value: + stringValue: vmnic0 + startTimeUnixNano: "6000000" + timeUnixNano: "5000000" + name: vcenter.host.network.packet.drop.rate + unit: '{packets/sec}' - description: The rate of packet errors transmitted or received on the host network. gauge: dataPoints: diff --git a/receiver/vcenterreceiver/testdata/metrics/expected.yaml b/receiver/vcenterreceiver/testdata/metrics/expected.yaml index f024ad16eabb..86ce769db7a3 100644 --- a/receiver/vcenterreceiver/testdata/metrics/expected.yaml +++ b/receiver/vcenterreceiver/testdata/metrics/expected.yaml @@ -155,6 +155,91 @@ resourceMetrics: stringValue: esxi-111.europe-southeast1.gve.goog scopeMetrics: - metrics: + - description: Total CPU capacity of the host system. + name: vcenter.host.cpu.capacity + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "93348" + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + unit: MHz + - description: The CPU of the host reserved for use by virtual machines. + name: vcenter.host.cpu.reserved + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "4000" + attributes: + - key: cpu_reservation_type + value: + stringValue: total + startTimeUnixNano: "6000000" + timeUnixNano: "1000000" + - asInt: "4000" + attributes: + - key: cpu_reservation_type + value: + stringValue: total + startTimeUnixNano: "6000000" + timeUnixNano: "2000000" + - asInt: "4000" + attributes: + - key: cpu_reservation_type + value: + stringValue: total + startTimeUnixNano: "6000000" + timeUnixNano: "3000000" + - asInt: "4000" + attributes: + - key: cpu_reservation_type + value: + stringValue: total + startTimeUnixNano: "6000000" + timeUnixNano: "4000000" + - asInt: "4000" + attributes: + - key: cpu_reservation_type + value: + stringValue: total + startTimeUnixNano: "6000000" + timeUnixNano: "5000000" + - asInt: "0" + attributes: + - key: cpu_reservation_type + value: + stringValue: used + startTimeUnixNano: "6000000" + timeUnixNano: "1000000" + - asInt: "0" + attributes: + - key: cpu_reservation_type + value: + stringValue: used + startTimeUnixNano: "6000000" + timeUnixNano: "2000000" + - asInt: "0" + attributes: + - key: cpu_reservation_type + value: + stringValue: used + startTimeUnixNano: "6000000" + timeUnixNano: "3000000" + - asInt: "0" + attributes: + - key: cpu_reservation_type + value: + stringValue: used + startTimeUnixNano: "6000000" + timeUnixNano: "4000000" + - asInt: "0" + attributes: + - key: cpu_reservation_type + value: + stringValue: used + startTimeUnixNano: "6000000" + timeUnixNano: "5000000" + unit: MHz - description: The amount of CPU used by the host. name: vcenter.host.cpu.usage sum: @@ -890,6 +975,111 @@ resourceMetrics: timeUnixNano: "2000000" name: vcenter.host.memory.utilization unit: '%' + - description: The rate of packets dropped across each physical NIC (network interface controller) instance on the host. + gauge: + dataPoints: + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: received + - key: object + value: + stringValue: vmnic2 + startTimeUnixNano: "6000000" + timeUnixNano: "1000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: received + - key: object + value: + stringValue: vmnic2 + startTimeUnixNano: "6000000" + timeUnixNano: "2000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: received + - key: object + value: + stringValue: vmnic2 + startTimeUnixNano: "6000000" + timeUnixNano: "3000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: received + - key: object + value: + stringValue: vmnic2 + startTimeUnixNano: "6000000" + timeUnixNano: "4000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: received + - key: object + value: + stringValue: vmnic2 + startTimeUnixNano: "6000000" + timeUnixNano: "5000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: transmitted + - key: object + value: + stringValue: vmnic2 + startTimeUnixNano: "6000000" + timeUnixNano: "1000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: transmitted + - key: object + value: + stringValue: vmnic2 + startTimeUnixNano: "6000000" + timeUnixNano: "2000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: transmitted + - key: object + value: + stringValue: vmnic2 + startTimeUnixNano: "6000000" + timeUnixNano: "3000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: transmitted + - key: object + value: + stringValue: vmnic2 + startTimeUnixNano: "6000000" + timeUnixNano: "4000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: transmitted + - key: object + value: + stringValue: vmnic2 + startTimeUnixNano: "6000000" + timeUnixNano: "5000000" + name: vcenter.host.network.packet.drop.rate + unit: '{packets/sec}' - description: The rate of packet errors transmitted or received on the host network. gauge: dataPoints: @@ -2603,6 +2793,91 @@ resourceMetrics: stringValue: esxi-27971.cf5e88ac.australia-southeast1.gve.goog scopeMetrics: - metrics: + - description: Total CPU capacity of the host system. + name: vcenter.host.cpu.capacity + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "93348" + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + unit: MHz + - description: The CPU of the host reserved for use by virtual machines. + name: vcenter.host.cpu.reserved + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "4000" + attributes: + - key: cpu_reservation_type + value: + stringValue: total + startTimeUnixNano: "6000000" + timeUnixNano: "1000000" + - asInt: "4000" + attributes: + - key: cpu_reservation_type + value: + stringValue: total + startTimeUnixNano: "6000000" + timeUnixNano: "2000000" + - asInt: "4000" + attributes: + - key: cpu_reservation_type + value: + stringValue: total + startTimeUnixNano: "6000000" + timeUnixNano: "3000000" + - asInt: "4000" + attributes: + - key: cpu_reservation_type + value: + stringValue: total + startTimeUnixNano: "6000000" + timeUnixNano: "4000000" + - asInt: "4000" + attributes: + - key: cpu_reservation_type + value: + stringValue: total + startTimeUnixNano: "6000000" + timeUnixNano: "5000000" + - asInt: "0" + attributes: + - key: cpu_reservation_type + value: + stringValue: used + startTimeUnixNano: "6000000" + timeUnixNano: "1000000" + - asInt: "0" + attributes: + - key: cpu_reservation_type + value: + stringValue: used + startTimeUnixNano: "6000000" + timeUnixNano: "2000000" + - asInt: "0" + attributes: + - key: cpu_reservation_type + value: + stringValue: used + startTimeUnixNano: "6000000" + timeUnixNano: "3000000" + - asInt: "0" + attributes: + - key: cpu_reservation_type + value: + stringValue: used + startTimeUnixNano: "6000000" + timeUnixNano: "4000000" + - asInt: "0" + attributes: + - key: cpu_reservation_type + value: + stringValue: used + startTimeUnixNano: "6000000" + timeUnixNano: "5000000" + unit: MHz - description: The amount of CPU used by the host. name: vcenter.host.cpu.usage sum: @@ -3338,6 +3613,111 @@ resourceMetrics: timeUnixNano: "2000000" name: vcenter.host.memory.utilization unit: '%' + - description: The rate of packets dropped across each physical NIC (network interface controller) instance on the host. + gauge: + dataPoints: + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: received + - key: object + value: + stringValue: vmnic0 + startTimeUnixNano: "6000000" + timeUnixNano: "1000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: received + - key: object + value: + stringValue: vmnic0 + startTimeUnixNano: "6000000" + timeUnixNano: "2000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: received + - key: object + value: + stringValue: vmnic0 + startTimeUnixNano: "6000000" + timeUnixNano: "3000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: received + - key: object + value: + stringValue: vmnic0 + startTimeUnixNano: "6000000" + timeUnixNano: "4000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: received + - key: object + value: + stringValue: vmnic0 + startTimeUnixNano: "6000000" + timeUnixNano: "5000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: transmitted + - key: object + value: + stringValue: vmnic0 + startTimeUnixNano: "6000000" + timeUnixNano: "1000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: transmitted + - key: object + value: + stringValue: vmnic0 + startTimeUnixNano: "6000000" + timeUnixNano: "2000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: transmitted + - key: object + value: + stringValue: vmnic0 + startTimeUnixNano: "6000000" + timeUnixNano: "3000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: transmitted + - key: object + value: + stringValue: vmnic0 + startTimeUnixNano: "6000000" + timeUnixNano: "4000000" + - asDouble: 0 + attributes: + - key: direction + value: + stringValue: transmitted + - key: object + value: + stringValue: vmnic0 + startTimeUnixNano: "6000000" + timeUnixNano: "5000000" + name: vcenter.host.network.packet.drop.rate + unit: '{packets/sec}' - description: The rate of packet errors transmitted or received on the host network. gauge: dataPoints: @@ -5210,6 +5590,14 @@ resourceMetrics: stringValue: CentOS 9 scopeMetrics: - metrics: + - description: Percentage of time that the virtual machine was ready, but could not get scheduled to run on the physical CPU. + gauge: + dataPoints: + - asInt: "0" + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + name: vcenter.vm.cpu.readiness + unit: '%' - description: The amount of CPU used by the VM. name: vcenter.vm.cpu.usage sum: @@ -5839,6 +6227,14 @@ resourceMetrics: stringValue: CentOS 7 scopeMetrics: - metrics: + - description: Percentage of time that the virtual machine was ready, but could not get scheduled to run on the physical CPU. + gauge: + dataPoints: + - asInt: "0" + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + name: vcenter.vm.cpu.readiness + unit: '%' - description: The amount of CPU used by the VM. name: vcenter.vm.cpu.usage sum: @@ -6468,6 +6864,14 @@ resourceMetrics: stringValue: CentOS 8 scopeMetrics: - metrics: + - description: Percentage of time that the virtual machine was ready, but could not get scheduled to run on the physical CPU. + gauge: + dataPoints: + - asInt: "0" + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + name: vcenter.vm.cpu.readiness + unit: '%' - description: The amount of CPU used by the VM. name: vcenter.vm.cpu.usage sum: