From 1d184dc0f11ac80dd4c3b2abe3f992bddbe0a3de Mon Sep 17 00:00:00 2001 From: Stefan Kurek Date: Mon, 5 Aug 2024 12:41:55 -0400 Subject: [PATCH] [receiver/vcenter] Enables the vSAN metrics by default (#34409) **Description:** Enables the vSAN metrics by default. Removes the warning about them being enabled in a future version. **Link to tracking Issue:** **Testing:** Unit tests run. Integration tests run. Test against live environment. **Documentation:** Documentation regenerated. --- .../vcenterreceiver-vsan-metrics-enabled.yaml | 40 ++ receiver/vcenterreceiver/documentation.md | 246 ++++---- .../internal/metadata/generated_config.go | 24 +- .../internal/metadata/generated_metrics.go | 36 -- .../metadata/generated_metrics_test.go | 60 +- receiver/vcenterreceiver/metadata.yaml | 48 +- receiver/vcenterreceiver/scraper_test.go | 12 - .../testdata/metrics/expected.yaml | 550 ++++++++++++++++++ 8 files changed, 744 insertions(+), 272 deletions(-) create mode 100644 .chloggen/vcenterreceiver-vsan-metrics-enabled.yaml diff --git a/.chloggen/vcenterreceiver-vsan-metrics-enabled.yaml b/.chloggen/vcenterreceiver-vsan-metrics-enabled.yaml new file mode 100644 index 000000000000..cfafd5fbef16 --- /dev/null +++ b/.chloggen/vcenterreceiver-vsan-metrics-enabled.yaml @@ -0,0 +1,40 @@ +# 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 all of the vSAN metrics by default. + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [34409] + +# (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 now: + - vcenter.cluster.vsan.throughput + - vcenter.cluster.vsan.operations + - vcenter.cluster.vsan.latency.avg + - vcenter.cluster.vsan.congestions + - vcenter.host.vsan.throughput + - vcenter.host.vsan.operations + - vcenter.host.vsan.latency.avg + - vcenter.host.vsan.congestions + - vcenter.host.vsan.cache.hit_rate + - vcenter.vm.vsan.throughput + - vcenter.vm.vsan.operations + - vcenter.vm.vsan.latency.avg + +# 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 3607c84c9934..0777da7acb44 100644 --- a/receiver/vcenterreceiver/documentation.md +++ b/receiver/vcenterreceiver/documentation.md @@ -82,6 +82,56 @@ The number of virtual machine templates in the cluster. | ---- | ----------- | ---------- | ----------------------- | --------- | | {virtual_machine_templates} | Sum | Int | Cumulative | false | +### vcenter.cluster.vsan.congestions + +The congestions of IOs generated by all vSAN clients in the cluster. + +| Unit | Metric Type | Value Type | +| ---- | ----------- | ---------- | +| {congestions/sec} | Gauge | Double | + +### vcenter.cluster.vsan.latency.avg + +The overall cluster latency while accessing vSAN storage. + +| Unit | Metric Type | Value Type | +| ---- | ----------- | ---------- | +| us | Gauge | Int | + +#### Attributes + +| Name | Description | Values | +| ---- | ----------- | ------ | +| type | The type of vSAN latency. | Str: ``read``, ``write`` | + +### vcenter.cluster.vsan.operations + +The vSAN IOPs of a cluster. + +| Unit | Metric Type | Value Type | +| ---- | ----------- | ---------- | +| {operations/sec} | Gauge | Int | + +#### Attributes + +| Name | Description | Values | +| ---- | ----------- | ------ | +| type | The type of vSAN operation. | Str: ``read``, ``write``, ``unmap`` | + +### vcenter.cluster.vsan.throughput + +The vSAN throughput of a cluster. + +| Unit | Metric Type | Value Type | +| ---- | ----------- | ---------- | +| By/s | Gauge | Double | + +#### Attributes + +| Name | Description | Values | +| ---- | ----------- | ------ | +| direction | The type of vSAN throughput. | Str: ``read``, ``write`` | + ### vcenter.datacenter.cluster.count The number of clusters in the datacenter. @@ -372,6 +422,74 @@ The sum of the data transmitted and received for all the NIC instances of the ho | ---- | ----------- | ------ | | object | The object on the virtual machine or host that is being reported on. | Any Str | +### vcenter.host.vsan.cache.hit_rate + +The host's read IOs which could be satisfied by the local client cache. + +As measured over the most recent 5m interval. + +| Unit | Metric Type | Value Type | +| ---- | ----------- | ---------- | +| % | Gauge | Int | + +### vcenter.host.vsan.congestions + +The congestions of IOs generated by all vSAN clients in the host. + +As measured over the most recent 5m interval. + +| Unit | Metric Type | Value Type | +| ---- | ----------- | ---------- | +| {congestions/sec} | Gauge | Double | + +### vcenter.host.vsan.latency.avg + +The host latency while accessing vSAN storage. + +As measured over the most recent 5m interval. + +| Unit | Metric Type | Value Type | +| ---- | ----------- | ---------- | +| us | Gauge | Int | + +#### Attributes + +| Name | Description | Values | +| ---- | ----------- | ------ | +| type | The type of vSAN latency. | Str: ``read``, ``write`` | + +### vcenter.host.vsan.operations + +The vSAN IOPs of a host. + +As measured over the most recent 5m interval. + +| Unit | Metric Type | Value Type | +| ---- | ----------- | ---------- | +| {operations/sec} | Gauge | Int | + +#### Attributes + +| Name | Description | Values | +| ---- | ----------- | ------ | +| type | The type of vSAN operation. | Str: ``read``, ``write``, ``unmap`` | + +### vcenter.host.vsan.throughput + +The vSAN throughput of a host. + +As measured over the most recent 5m interval. + +| Unit | Metric Type | Value Type | +| ---- | ----------- | ---------- | +| By/s | Gauge | Double | + +#### Attributes + +| Name | Description | Values | +| ---- | ----------- | ------ | +| direction | The type of vSAN throughput. | Str: ``read``, ``write`` | + ### vcenter.resource_pool.cpu.shares The amount of shares of CPU in the resource pool. @@ -642,134 +760,6 @@ As measured over the most recent 20s interval. | ---- | ----------- | ------ | | object | The object on the virtual machine or host that is being reported on. | Any Str | -## Optional Metrics - -The following metrics are not emitted by default. Each of them can be enabled by applying the following configuration: - -```yaml -metrics: - : - enabled: true -``` - -### vcenter.cluster.vsan.congestions - -The congestions of IOs generated by all vSAN clients in the cluster. - -| Unit | Metric Type | Value Type | -| ---- | ----------- | ---------- | -| {congestions/sec} | Gauge | Double | - -### vcenter.cluster.vsan.latency.avg - -The overall cluster latency while accessing vSAN storage. - -| Unit | Metric Type | Value Type | -| ---- | ----------- | ---------- | -| us | Gauge | Int | - -#### Attributes - -| Name | Description | Values | -| ---- | ----------- | ------ | -| type | The type of vSAN latency. | Str: ``read``, ``write`` | - -### vcenter.cluster.vsan.operations - -The vSAN IOPs of a cluster. - -| Unit | Metric Type | Value Type | -| ---- | ----------- | ---------- | -| {operations/sec} | Gauge | Int | - -#### Attributes - -| Name | Description | Values | -| ---- | ----------- | ------ | -| type | The type of vSAN operation. | Str: ``read``, ``write``, ``unmap`` | - -### vcenter.cluster.vsan.throughput - -The vSAN throughput of a cluster. - -| Unit | Metric Type | Value Type | -| ---- | ----------- | ---------- | -| By/s | Gauge | Double | - -#### Attributes - -| Name | Description | Values | -| ---- | ----------- | ------ | -| direction | The type of vSAN throughput. | Str: ``read``, ``write`` | - -### vcenter.host.vsan.cache.hit_rate - -The host's read IOs which could be satisfied by the local client cache. - -As measured over the most recent 5m interval. - -| Unit | Metric Type | Value Type | -| ---- | ----------- | ---------- | -| % | Gauge | Int | - -### vcenter.host.vsan.congestions - -The congestions of IOs generated by all vSAN clients in the host. - -As measured over the most recent 5m interval. - -| Unit | Metric Type | Value Type | -| ---- | ----------- | ---------- | -| {congestions/sec} | Gauge | Double | - -### vcenter.host.vsan.latency.avg - -The host latency while accessing vSAN storage. - -As measured over the most recent 5m interval. - -| Unit | Metric Type | Value Type | -| ---- | ----------- | ---------- | -| us | Gauge | Int | - -#### Attributes - -| Name | Description | Values | -| ---- | ----------- | ------ | -| type | The type of vSAN latency. | Str: ``read``, ``write`` | - -### vcenter.host.vsan.operations - -The vSAN IOPs of a host. - -As measured over the most recent 5m interval. - -| Unit | Metric Type | Value Type | -| ---- | ----------- | ---------- | -| {operations/sec} | Gauge | Int | - -#### Attributes - -| Name | Description | Values | -| ---- | ----------- | ------ | -| type | The type of vSAN operation. | Str: ``read``, ``write``, ``unmap`` | - -### vcenter.host.vsan.throughput - -The vSAN throughput of a host. - -As measured over the most recent 5m interval. - -| Unit | Metric Type | Value Type | -| ---- | ----------- | ---------- | -| By/s | Gauge | Double | - -#### Attributes - -| Name | Description | Values | -| ---- | ----------- | ------ | -| direction | The type of vSAN throughput. | Str: ``read``, ``write`` | - ### vcenter.vm.vsan.latency.avg The virtual machine latency while accessing vSAN storage. diff --git a/receiver/vcenterreceiver/internal/metadata/generated_config.go b/receiver/vcenterreceiver/internal/metadata/generated_config.go index 9b9bb560a8a6..fed73e8bfda7 100644 --- a/receiver/vcenterreceiver/internal/metadata/generated_config.go +++ b/receiver/vcenterreceiver/internal/metadata/generated_config.go @@ -120,16 +120,16 @@ func DefaultMetricsConfig() MetricsConfig { Enabled: true, }, VcenterClusterVsanCongestions: MetricConfig{ - Enabled: false, + Enabled: true, }, VcenterClusterVsanLatencyAvg: MetricConfig{ - Enabled: false, + Enabled: true, }, VcenterClusterVsanOperations: MetricConfig{ - Enabled: false, + Enabled: true, }, VcenterClusterVsanThroughput: MetricConfig{ - Enabled: false, + Enabled: true, }, VcenterDatacenterClusterCount: MetricConfig{ Enabled: true, @@ -201,19 +201,19 @@ func DefaultMetricsConfig() MetricsConfig { Enabled: true, }, VcenterHostVsanCacheHitRate: MetricConfig{ - Enabled: false, + Enabled: true, }, VcenterHostVsanCongestions: MetricConfig{ - Enabled: false, + Enabled: true, }, VcenterHostVsanLatencyAvg: MetricConfig{ - Enabled: false, + Enabled: true, }, VcenterHostVsanOperations: MetricConfig{ - Enabled: false, + Enabled: true, }, VcenterHostVsanThroughput: MetricConfig{ - Enabled: false, + Enabled: true, }, VcenterResourcePoolCPUShares: MetricConfig{ Enabled: true, @@ -288,13 +288,13 @@ func DefaultMetricsConfig() MetricsConfig { Enabled: true, }, VcenterVMVsanLatencyAvg: MetricConfig{ - Enabled: false, + Enabled: true, }, VcenterVMVsanOperations: MetricConfig{ - Enabled: false, + Enabled: true, }, VcenterVMVsanThroughput: MetricConfig{ - Enabled: false, + Enabled: true, }, } } diff --git a/receiver/vcenterreceiver/internal/metadata/generated_metrics.go b/receiver/vcenterreceiver/internal/metadata/generated_metrics.go index 007275fbaa25..416cd1fba84b 100644 --- a/receiver/vcenterreceiver/internal/metadata/generated_metrics.go +++ b/receiver/vcenterreceiver/internal/metadata/generated_metrics.go @@ -3863,42 +3863,6 @@ func WithStartTime(startTime pcommon.Timestamp) metricBuilderOption { } func NewMetricsBuilder(mbc MetricsBuilderConfig, settings receiver.Settings, options ...metricBuilderOption) *MetricsBuilder { - if !mbc.Metrics.VcenterClusterVsanCongestions.enabledSetByUser { - settings.Logger.Warn("[WARNING] Please set `enabled` field explicitly for `vcenter.cluster.vsan.congestions`: this metric will be enabled by default starting in release v0.107.0") - } - if !mbc.Metrics.VcenterClusterVsanLatencyAvg.enabledSetByUser { - settings.Logger.Warn("[WARNING] Please set `enabled` field explicitly for `vcenter.cluster.vsan.latency.avg`: this metric will be enabled by default starting in release v0.107.0") - } - if !mbc.Metrics.VcenterClusterVsanOperations.enabledSetByUser { - settings.Logger.Warn("[WARNING] Please set `enabled` field explicitly for `vcenter.cluster.vsan.operations`: this metric will be enabled by default starting in release v0.107.0") - } - if !mbc.Metrics.VcenterClusterVsanThroughput.enabledSetByUser { - settings.Logger.Warn("[WARNING] Please set `enabled` field explicitly for `vcenter.cluster.vsan.throughput`: this metric will be enabled by default starting in release v0.107.0") - } - if !mbc.Metrics.VcenterHostVsanCacheHitRate.enabledSetByUser { - settings.Logger.Warn("[WARNING] Please set `enabled` field explicitly for `vcenter.host.vsan.cache.hit_rate`: this metric will be enabled by default starting in release v0.107.0") - } - if !mbc.Metrics.VcenterHostVsanCongestions.enabledSetByUser { - settings.Logger.Warn("[WARNING] Please set `enabled` field explicitly for `vcenter.host.vsan.congestions`: this metric will be enabled by default starting in release v0.107.0") - } - if !mbc.Metrics.VcenterHostVsanLatencyAvg.enabledSetByUser { - settings.Logger.Warn("[WARNING] Please set `enabled` field explicitly for `vcenter.host.vsan.latency.avg`: this metric will be enabled by default starting in release v0.107.0") - } - if !mbc.Metrics.VcenterHostVsanOperations.enabledSetByUser { - settings.Logger.Warn("[WARNING] Please set `enabled` field explicitly for `vcenter.host.vsan.operations`: this metric will be enabled by default starting in release v0.107.0") - } - if !mbc.Metrics.VcenterHostVsanThroughput.enabledSetByUser { - settings.Logger.Warn("[WARNING] Please set `enabled` field explicitly for `vcenter.host.vsan.throughput`: this metric will be enabled by default starting in release v0.107.0") - } - if !mbc.Metrics.VcenterVMVsanLatencyAvg.enabledSetByUser { - settings.Logger.Warn("[WARNING] Please set `enabled` field explicitly for `vcenter.vm.vsan.latency.avg`: this metric will be enabled by default starting in release v0.107.0") - } - if !mbc.Metrics.VcenterVMVsanOperations.enabledSetByUser { - settings.Logger.Warn("[WARNING] Please set `enabled` field explicitly for `vcenter.vm.vsan.operations`: this metric will be enabled by default starting in release v0.107.0") - } - if !mbc.Metrics.VcenterVMVsanThroughput.enabledSetByUser { - settings.Logger.Warn("[WARNING] Please set `enabled` field explicitly for `vcenter.vm.vsan.throughput`: this metric will be enabled by default starting in release v0.107.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 94ecfe596c02..7ff6ee347953 100644 --- a/receiver/vcenterreceiver/internal/metadata/generated_metrics_test.go +++ b/receiver/vcenterreceiver/internal/metadata/generated_metrics_test.go @@ -62,54 +62,6 @@ func TestMetricsBuilder(t *testing.T) { mb := NewMetricsBuilder(loadMetricsBuilderConfig(t, test.name), settings, WithStartTime(start)) expectedWarnings := 0 - if test.metricsSet == testDataSetDefault { - assert.Equal(t, "[WARNING] Please set `enabled` field explicitly for `vcenter.cluster.vsan.congestions`: this metric will be enabled by default starting in release v0.107.0", observedLogs.All()[expectedWarnings].Message) - expectedWarnings++ - } - if test.metricsSet == testDataSetDefault { - assert.Equal(t, "[WARNING] Please set `enabled` field explicitly for `vcenter.cluster.vsan.latency.avg`: this metric will be enabled by default starting in release v0.107.0", observedLogs.All()[expectedWarnings].Message) - expectedWarnings++ - } - if test.metricsSet == testDataSetDefault { - assert.Equal(t, "[WARNING] Please set `enabled` field explicitly for `vcenter.cluster.vsan.operations`: this metric will be enabled by default starting in release v0.107.0", observedLogs.All()[expectedWarnings].Message) - expectedWarnings++ - } - if test.metricsSet == testDataSetDefault { - assert.Equal(t, "[WARNING] Please set `enabled` field explicitly for `vcenter.cluster.vsan.throughput`: this metric will be enabled by default starting in release v0.107.0", observedLogs.All()[expectedWarnings].Message) - expectedWarnings++ - } - if test.metricsSet == testDataSetDefault { - assert.Equal(t, "[WARNING] Please set `enabled` field explicitly for `vcenter.host.vsan.cache.hit_rate`: this metric will be enabled by default starting in release v0.107.0", observedLogs.All()[expectedWarnings].Message) - expectedWarnings++ - } - if test.metricsSet == testDataSetDefault { - assert.Equal(t, "[WARNING] Please set `enabled` field explicitly for `vcenter.host.vsan.congestions`: this metric will be enabled by default starting in release v0.107.0", observedLogs.All()[expectedWarnings].Message) - expectedWarnings++ - } - if test.metricsSet == testDataSetDefault { - assert.Equal(t, "[WARNING] Please set `enabled` field explicitly for `vcenter.host.vsan.latency.avg`: this metric will be enabled by default starting in release v0.107.0", observedLogs.All()[expectedWarnings].Message) - expectedWarnings++ - } - if test.metricsSet == testDataSetDefault { - assert.Equal(t, "[WARNING] Please set `enabled` field explicitly for `vcenter.host.vsan.operations`: this metric will be enabled by default starting in release v0.107.0", observedLogs.All()[expectedWarnings].Message) - expectedWarnings++ - } - if test.metricsSet == testDataSetDefault { - assert.Equal(t, "[WARNING] Please set `enabled` field explicitly for `vcenter.host.vsan.throughput`: this metric will be enabled by default starting in release v0.107.0", observedLogs.All()[expectedWarnings].Message) - expectedWarnings++ - } - if test.metricsSet == testDataSetDefault { - assert.Equal(t, "[WARNING] Please set `enabled` field explicitly for `vcenter.vm.vsan.latency.avg`: this metric will be enabled by default starting in release v0.107.0", observedLogs.All()[expectedWarnings].Message) - expectedWarnings++ - } - if test.metricsSet == testDataSetDefault { - assert.Equal(t, "[WARNING] Please set `enabled` field explicitly for `vcenter.vm.vsan.operations`: this metric will be enabled by default starting in release v0.107.0", observedLogs.All()[expectedWarnings].Message) - expectedWarnings++ - } - if test.metricsSet == testDataSetDefault { - assert.Equal(t, "[WARNING] Please set `enabled` field explicitly for `vcenter.vm.vsan.throughput`: this metric will be enabled by default starting in release v0.107.0", observedLogs.All()[expectedWarnings].Message) - expectedWarnings++ - } assert.Equal(t, expectedWarnings, observedLogs.Len()) @@ -144,15 +96,19 @@ func TestMetricsBuilder(t *testing.T) { allMetricsCount++ mb.RecordVcenterClusterVMTemplateCountDataPoint(ts, 1) + defaultMetricsCount++ allMetricsCount++ mb.RecordVcenterClusterVsanCongestionsDataPoint(ts, 1) + defaultMetricsCount++ allMetricsCount++ mb.RecordVcenterClusterVsanLatencyAvgDataPoint(ts, 1, AttributeVsanLatencyTypeRead) + defaultMetricsCount++ allMetricsCount++ mb.RecordVcenterClusterVsanOperationsDataPoint(ts, 1, AttributeVsanOperationTypeRead) + defaultMetricsCount++ allMetricsCount++ mb.RecordVcenterClusterVsanThroughputDataPoint(ts, 1, AttributeVsanThroughputDirectionRead) @@ -248,18 +204,23 @@ func TestMetricsBuilder(t *testing.T) { allMetricsCount++ mb.RecordVcenterHostNetworkUsageDataPoint(ts, 1, "object_name-val") + defaultMetricsCount++ allMetricsCount++ mb.RecordVcenterHostVsanCacheHitRateDataPoint(ts, 1) + defaultMetricsCount++ allMetricsCount++ mb.RecordVcenterHostVsanCongestionsDataPoint(ts, 1) + defaultMetricsCount++ allMetricsCount++ mb.RecordVcenterHostVsanLatencyAvgDataPoint(ts, 1, AttributeVsanLatencyTypeRead) + defaultMetricsCount++ allMetricsCount++ mb.RecordVcenterHostVsanOperationsDataPoint(ts, 1, AttributeVsanOperationTypeRead) + defaultMetricsCount++ allMetricsCount++ mb.RecordVcenterHostVsanThroughputDataPoint(ts, 1, AttributeVsanThroughputDirectionRead) @@ -359,12 +320,15 @@ func TestMetricsBuilder(t *testing.T) { allMetricsCount++ mb.RecordVcenterVMNetworkUsageDataPoint(ts, 1, "object_name-val") + defaultMetricsCount++ allMetricsCount++ mb.RecordVcenterVMVsanLatencyAvgDataPoint(ts, 1, AttributeVsanLatencyTypeRead) + defaultMetricsCount++ allMetricsCount++ mb.RecordVcenterVMVsanOperationsDataPoint(ts, 1, AttributeVsanOperationTypeRead) + defaultMetricsCount++ allMetricsCount++ mb.RecordVcenterVMVsanThroughputDataPoint(ts, 1, AttributeVsanThroughputDirectionRead) diff --git a/receiver/vcenterreceiver/metadata.yaml b/receiver/vcenterreceiver/metadata.yaml index c7893978b2d4..fd819f993250 100644 --- a/receiver/vcenterreceiver/metadata.yaml +++ b/receiver/vcenterreceiver/metadata.yaml @@ -295,41 +295,33 @@ metrics: aggregation_temporality: cumulative attributes: [host_effective] vcenter.cluster.vsan.throughput: - enabled: false + enabled: true description: The vSAN throughput of a cluster. unit: "By/s" gauge: value_type: double attributes: [vsan_throughput_direction] - warnings: - if_enabled_not_set: "this metric will be enabled by default starting in release v0.107.0" vcenter.cluster.vsan.operations: - enabled: false + enabled: true description: The vSAN IOPs of a cluster. unit: "{operations/sec}" gauge: value_type: int attributes: [vsan_operation_type] - warnings: - if_enabled_not_set: "this metric will be enabled by default starting in release v0.107.0" vcenter.cluster.vsan.latency.avg: - enabled: false + enabled: true description: The overall cluster latency while accessing vSAN storage. unit: "us" gauge: value_type: int attributes: [vsan_latency_type] - warnings: - if_enabled_not_set: "this metric will be enabled by default starting in release v0.107.0" vcenter.cluster.vsan.congestions: - enabled: false + enabled: true description: The congestions of IOs generated by all vSAN clients in the cluster. unit: "{congestions/sec}" gauge: value_type: double attributes: [] - warnings: - if_enabled_not_set: "this metric will be enabled by default starting in release v0.107.0" vcenter.datastore.disk.usage: enabled: true description: The amount of space in the datastore. @@ -466,55 +458,45 @@ metrics: attributes: [throughput_direction, object_name] extended_documentation: As measured over the most recent 20s interval. vcenter.host.vsan.throughput: - enabled: false + enabled: true description: The vSAN throughput of a host. unit: "By/s" gauge: value_type: double attributes: [vsan_throughput_direction] extended_documentation: As measured over the most recent 5m interval. - warnings: - if_enabled_not_set: "this metric will be enabled by default starting in release v0.107.0" vcenter.host.vsan.operations: - enabled: false + enabled: true description: The vSAN IOPs of a host. unit: "{operations/sec}" gauge: value_type: int attributes: [vsan_operation_type] extended_documentation: As measured over the most recent 5m interval. - warnings: - if_enabled_not_set: "this metric will be enabled by default starting in release v0.107.0" vcenter.host.vsan.latency.avg: - enabled: false + enabled: true description: The host latency while accessing vSAN storage. unit: "us" gauge: value_type: int attributes: [vsan_latency_type] extended_documentation: As measured over the most recent 5m interval. - warnings: - if_enabled_not_set: "this metric will be enabled by default starting in release v0.107.0" vcenter.host.vsan.congestions: - enabled: false + enabled: true description: The congestions of IOs generated by all vSAN clients in the host. unit: "{congestions/sec}" gauge: value_type: double attributes: [] extended_documentation: As measured over the most recent 5m interval. - warnings: - if_enabled_not_set: "this metric will be enabled by default starting in release v0.107.0" vcenter.host.vsan.cache.hit_rate: - enabled: false + enabled: true description: The host's read IOs which could be satisfied by the local client cache. unit: "%" gauge: value_type: int attributes: [] extended_documentation: As measured over the most recent 5m interval. - warnings: - if_enabled_not_set: "this metric will be enabled by default starting in release v0.107.0" vcenter.resource_pool.memory.usage: enabled: true description: The usage of the memory by the resource pool. @@ -720,29 +702,23 @@ metrics: value_type: double attributes: [] vcenter.vm.vsan.throughput: - enabled: false + enabled: true description: The vSAN throughput of a virtual machine. unit: "By/s" gauge: value_type: double attributes: [vsan_throughput_direction] - warnings: - if_enabled_not_set: "this metric will be enabled by default starting in release v0.107.0" vcenter.vm.vsan.operations: - enabled: false + enabled: true description: The vSAN IOPs of a virtual machine. unit: "{operations/sec}" gauge: value_type: int attributes: [vsan_operation_type] - warnings: - if_enabled_not_set: "this metric will be enabled by default starting in release v0.107.0" vcenter.vm.vsan.latency.avg: - enabled: false + enabled: true description: The virtual machine latency while accessing vSAN storage. unit: "us" gauge: value_type: int attributes: [vsan_latency_type] - warnings: - if_enabled_not_set: "this metric will be enabled by default starting in release v0.107.0" diff --git a/receiver/vcenterreceiver/scraper_test.go b/receiver/vcenterreceiver/scraper_test.go index e6c7e28001c9..c550f4d441f4 100644 --- a/receiver/vcenterreceiver/scraper_test.go +++ b/receiver/vcenterreceiver/scraper_test.go @@ -41,18 +41,6 @@ func TestScrapeConfigsEnabled(t *testing.T) { optConfigs := metadata.DefaultMetricsBuilderConfig() setResourcePoolMemoryUsageAttrFeatureGate(t, true) - optConfigs.Metrics.VcenterVMVsanLatencyAvg.Enabled = true - optConfigs.Metrics.VcenterVMVsanOperations.Enabled = true - optConfigs.Metrics.VcenterVMVsanThroughput.Enabled = true - optConfigs.Metrics.VcenterHostVsanCacheHitRate.Enabled = true - optConfigs.Metrics.VcenterHostVsanThroughput.Enabled = true - optConfigs.Metrics.VcenterHostVsanOperations.Enabled = true - optConfigs.Metrics.VcenterHostVsanLatencyAvg.Enabled = true - optConfigs.Metrics.VcenterHostVsanCongestions.Enabled = true - optConfigs.Metrics.VcenterClusterVsanLatencyAvg.Enabled = true - optConfigs.Metrics.VcenterClusterVsanOperations.Enabled = true - optConfigs.Metrics.VcenterClusterVsanThroughput.Enabled = true - optConfigs.Metrics.VcenterClusterVsanCongestions.Enabled = true cfg := &Config{ MetricsBuilderConfig: optConfigs, diff --git a/receiver/vcenterreceiver/testdata/metrics/expected.yaml b/receiver/vcenterreceiver/testdata/metrics/expected.yaml index 67a87ccaec2b..c25cec04bff2 100644 --- a/receiver/vcenterreceiver/testdata/metrics/expected.yaml +++ b/receiver/vcenterreceiver/testdata/metrics/expected.yaml @@ -234,6 +234,116 @@ resourceMetrics: startTimeUnixNano: "1000000" timeUnixNano: "2000000" unit: '{virtual_machine_templates}' + - description: The congestions of IOs generated by all vSAN clients in the cluster. + gauge: + dataPoints: + - asDouble: 5 + startTimeUnixNano: "3000000" + timeUnixNano: "1000000" + - asDouble: 6 + startTimeUnixNano: "3000000" + timeUnixNano: "2000000" + name: vcenter.cluster.vsan.congestions + unit: '{congestions/sec}' + - description: The overall cluster latency while accessing vSAN storage. + gauge: + dataPoints: + - asInt: "14" + attributes: + - key: type + value: + stringValue: read + startTimeUnixNano: "3000000" + timeUnixNano: "1000000" + - asInt: "15" + attributes: + - key: type + value: + stringValue: read + startTimeUnixNano: "3000000" + timeUnixNano: "2000000" + - asInt: "16" + attributes: + - key: type + value: + stringValue: write + startTimeUnixNano: "3000000" + timeUnixNano: "1000000" + - asInt: "17" + attributes: + - key: type + value: + stringValue: write + startTimeUnixNano: "3000000" + timeUnixNano: "2000000" + name: vcenter.cluster.vsan.latency.avg + unit: us + - description: The vSAN IOPs of a cluster. + gauge: + dataPoints: + - asInt: "10" + attributes: + - key: type + value: + stringValue: read + startTimeUnixNano: "3000000" + timeUnixNano: "1000000" + - asInt: "11" + attributes: + - key: type + value: + stringValue: read + startTimeUnixNano: "3000000" + timeUnixNano: "2000000" + - asInt: "12" + attributes: + - key: type + value: + stringValue: write + startTimeUnixNano: "3000000" + timeUnixNano: "1000000" + - asInt: "13" + attributes: + - key: type + value: + stringValue: write + startTimeUnixNano: "3000000" + timeUnixNano: "2000000" + name: vcenter.cluster.vsan.operations + unit: '{operations/sec}' + - description: The vSAN throughput of a cluster. + gauge: + dataPoints: + - asDouble: 1 + attributes: + - key: direction + value: + stringValue: read + startTimeUnixNano: "3000000" + timeUnixNano: "1000000" + - asDouble: 2 + attributes: + - key: direction + value: + stringValue: read + startTimeUnixNano: "3000000" + timeUnixNano: "2000000" + - asDouble: 3 + attributes: + - key: direction + value: + stringValue: write + startTimeUnixNano: "3000000" + timeUnixNano: "1000000" + - asDouble: 4 + attributes: + - key: direction + value: + stringValue: write + startTimeUnixNano: "3000000" + timeUnixNano: "2000000" + name: vcenter.cluster.vsan.throughput + unit: By/s scope: name: otelcol/vcenterreceiver version: latest @@ -2910,6 +3020,127 @@ resourceMetrics: startTimeUnixNano: "6000000" timeUnixNano: "5000000" unit: '{KiBy/s}' + - description: The host's read IOs which could be satisfied by the local client cache. + gauge: + dataPoints: + - asInt: "82" + startTimeUnixNano: "3000000" + timeUnixNano: "1000000" + - asInt: "88" + startTimeUnixNano: "3000000" + timeUnixNano: "2000000" + name: vcenter.host.vsan.cache.hit_rate + unit: '%' + - description: The congestions of IOs generated by all vSAN clients in the host. + gauge: + dataPoints: + - asDouble: 3 + startTimeUnixNano: "3000000" + timeUnixNano: "1000000" + - asDouble: 4 + startTimeUnixNano: "3000000" + timeUnixNano: "2000000" + name: vcenter.host.vsan.congestions + unit: '{congestions/sec}' + - description: The host latency while accessing vSAN storage. + gauge: + dataPoints: + - asInt: "24" + attributes: + - key: type + value: + stringValue: read + startTimeUnixNano: "3000000" + timeUnixNano: "1000000" + - asInt: "25" + attributes: + - key: type + value: + stringValue: read + startTimeUnixNano: "3000000" + timeUnixNano: "2000000" + - asInt: "26" + attributes: + - key: type + value: + stringValue: write + startTimeUnixNano: "3000000" + timeUnixNano: "1000000" + - asInt: "27" + attributes: + - key: type + value: + stringValue: write + startTimeUnixNano: "3000000" + timeUnixNano: "2000000" + name: vcenter.host.vsan.latency.avg + unit: us + - description: The vSAN IOPs of a host. + gauge: + dataPoints: + - asInt: "20" + attributes: + - key: type + value: + stringValue: read + startTimeUnixNano: "3000000" + timeUnixNano: "1000000" + - asInt: "21" + attributes: + - key: type + value: + stringValue: read + startTimeUnixNano: "3000000" + timeUnixNano: "2000000" + - asInt: "22" + attributes: + - key: type + value: + stringValue: write + startTimeUnixNano: "3000000" + timeUnixNano: "1000000" + - asInt: "23" + attributes: + - key: type + value: + stringValue: write + startTimeUnixNano: "3000000" + timeUnixNano: "2000000" + name: vcenter.host.vsan.operations + unit: '{operations/sec}' + - description: The vSAN throughput of a host. + gauge: + dataPoints: + - asDouble: 6 + attributes: + - key: direction + value: + stringValue: read + startTimeUnixNano: "3000000" + timeUnixNano: "1000000" + - asDouble: 7 + attributes: + - key: direction + value: + stringValue: read + startTimeUnixNano: "3000000" + timeUnixNano: "2000000" + - asDouble: 8 + attributes: + - key: direction + value: + stringValue: write + startTimeUnixNano: "3000000" + timeUnixNano: "1000000" + - asDouble: 9 + attributes: + - key: direction + value: + stringValue: write + startTimeUnixNano: "3000000" + timeUnixNano: "2000000" + name: vcenter.host.vsan.throughput + unit: By/s scope: name: otelcol/vcenterreceiver version: latest @@ -5548,6 +5779,127 @@ resourceMetrics: startTimeUnixNano: "6000000" timeUnixNano: "5000000" unit: '{KiBy/s}' + - description: The host's read IOs which could be satisfied by the local client cache. + gauge: + dataPoints: + - asInt: "92" + startTimeUnixNano: "3000000" + timeUnixNano: "1000000" + - asInt: "96" + startTimeUnixNano: "3000000" + timeUnixNano: "2000000" + name: vcenter.host.vsan.cache.hit_rate + unit: '%' + - description: The congestions of IOs generated by all vSAN clients in the host. + gauge: + dataPoints: + - asDouble: 2 + startTimeUnixNano: "3000000" + timeUnixNano: "1000000" + - asDouble: 3 + startTimeUnixNano: "3000000" + timeUnixNano: "2000000" + name: vcenter.host.vsan.congestions + unit: '{congestions/sec}' + - description: The host latency while accessing vSAN storage. + gauge: + dataPoints: + - asInt: "14" + attributes: + - key: type + value: + stringValue: read + startTimeUnixNano: "3000000" + timeUnixNano: "1000000" + - asInt: "15" + attributes: + - key: type + value: + stringValue: read + startTimeUnixNano: "3000000" + timeUnixNano: "2000000" + - asInt: "16" + attributes: + - key: type + value: + stringValue: write + startTimeUnixNano: "3000000" + timeUnixNano: "1000000" + - asInt: "17" + attributes: + - key: type + value: + stringValue: write + startTimeUnixNano: "3000000" + timeUnixNano: "2000000" + name: vcenter.host.vsan.latency.avg + unit: us + - description: The vSAN IOPs of a host. + gauge: + dataPoints: + - asInt: "10" + attributes: + - key: type + value: + stringValue: read + startTimeUnixNano: "3000000" + timeUnixNano: "1000000" + - asInt: "11" + attributes: + - key: type + value: + stringValue: read + startTimeUnixNano: "3000000" + timeUnixNano: "2000000" + - asInt: "12" + attributes: + - key: type + value: + stringValue: write + startTimeUnixNano: "3000000" + timeUnixNano: "1000000" + - asInt: "13" + attributes: + - key: type + value: + stringValue: write + startTimeUnixNano: "3000000" + timeUnixNano: "2000000" + name: vcenter.host.vsan.operations + unit: '{operations/sec}' + - description: The vSAN throughput of a host. + gauge: + dataPoints: + - asDouble: 1 + attributes: + - key: direction + value: + stringValue: read + startTimeUnixNano: "3000000" + timeUnixNano: "1000000" + - asDouble: 2 + attributes: + - key: direction + value: + stringValue: read + startTimeUnixNano: "3000000" + timeUnixNano: "2000000" + - asDouble: 3 + attributes: + - key: direction + value: + stringValue: write + startTimeUnixNano: "3000000" + timeUnixNano: "1000000" + - asDouble: 4 + attributes: + - key: direction + value: + stringValue: write + startTimeUnixNano: "3000000" + timeUnixNano: "2000000" + name: vcenter.host.vsan.throughput + unit: By/s scope: name: otelcol/vcenterreceiver version: latest @@ -7045,6 +7397,105 @@ resourceMetrics: startTimeUnixNano: "2000000" timeUnixNano: "1000000" unit: '{KiBy/s}' + - description: The virtual machine latency while accessing vSAN storage. + gauge: + dataPoints: + - asInt: "14" + attributes: + - key: type + value: + stringValue: read + startTimeUnixNano: "3000000" + timeUnixNano: "1000000" + - asInt: "15" + attributes: + - key: type + value: + stringValue: read + startTimeUnixNano: "3000000" + timeUnixNano: "2000000" + - asInt: "16" + attributes: + - key: type + value: + stringValue: write + startTimeUnixNano: "3000000" + timeUnixNano: "1000000" + - asInt: "17" + attributes: + - key: type + value: + stringValue: write + startTimeUnixNano: "3000000" + timeUnixNano: "2000000" + name: vcenter.vm.vsan.latency.avg + unit: us + - description: The vSAN IOPs of a virtual machine. + gauge: + dataPoints: + - asInt: "10" + attributes: + - key: type + value: + stringValue: read + startTimeUnixNano: "3000000" + timeUnixNano: "1000000" + - asInt: "11" + attributes: + - key: type + value: + stringValue: read + startTimeUnixNano: "3000000" + timeUnixNano: "2000000" + - asInt: "12" + attributes: + - key: type + value: + stringValue: write + startTimeUnixNano: "3000000" + timeUnixNano: "1000000" + - asInt: "13" + attributes: + - key: type + value: + stringValue: write + startTimeUnixNano: "3000000" + timeUnixNano: "2000000" + name: vcenter.vm.vsan.operations + unit: '{operations/sec}' + - description: The vSAN throughput of a virtual machine. + gauge: + dataPoints: + - asDouble: 1 + attributes: + - key: direction + value: + stringValue: read + startTimeUnixNano: "3000000" + timeUnixNano: "1000000" + - asDouble: 2 + attributes: + - key: direction + value: + stringValue: read + startTimeUnixNano: "3000000" + timeUnixNano: "2000000" + - asDouble: 3 + attributes: + - key: direction + value: + stringValue: write + startTimeUnixNano: "3000000" + timeUnixNano: "1000000" + - asDouble: 4 + attributes: + - key: direction + value: + stringValue: write + startTimeUnixNano: "3000000" + timeUnixNano: "2000000" + name: vcenter.vm.vsan.throughput + unit: By/s scope: name: otelcol/vcenterreceiver version: latest @@ -7682,6 +8133,105 @@ resourceMetrics: startTimeUnixNano: "2000000" timeUnixNano: "1000000" unit: '{KiBy/s}' + - description: The virtual machine latency while accessing vSAN storage. + gauge: + dataPoints: + - asInt: "24" + attributes: + - key: type + value: + stringValue: read + startTimeUnixNano: "3000000" + timeUnixNano: "1000000" + - asInt: "25" + attributes: + - key: type + value: + stringValue: read + startTimeUnixNano: "3000000" + timeUnixNano: "2000000" + - asInt: "26" + attributes: + - key: type + value: + stringValue: write + startTimeUnixNano: "3000000" + timeUnixNano: "1000000" + - asInt: "27" + attributes: + - key: type + value: + stringValue: write + startTimeUnixNano: "3000000" + timeUnixNano: "2000000" + name: vcenter.vm.vsan.latency.avg + unit: us + - description: The vSAN IOPs of a virtual machine. + gauge: + dataPoints: + - asInt: "20" + attributes: + - key: type + value: + stringValue: read + startTimeUnixNano: "3000000" + timeUnixNano: "1000000" + - asInt: "21" + attributes: + - key: type + value: + stringValue: read + startTimeUnixNano: "3000000" + timeUnixNano: "2000000" + - asInt: "22" + attributes: + - key: type + value: + stringValue: write + startTimeUnixNano: "3000000" + timeUnixNano: "1000000" + - asInt: "23" + attributes: + - key: type + value: + stringValue: write + startTimeUnixNano: "3000000" + timeUnixNano: "2000000" + name: vcenter.vm.vsan.operations + unit: '{operations/sec}' + - description: The vSAN throughput of a virtual machine. + gauge: + dataPoints: + - asDouble: 6 + attributes: + - key: direction + value: + stringValue: read + startTimeUnixNano: "3000000" + timeUnixNano: "1000000" + - asDouble: 7 + attributes: + - key: direction + value: + stringValue: read + startTimeUnixNano: "3000000" + timeUnixNano: "2000000" + - asDouble: 8 + attributes: + - key: direction + value: + stringValue: write + startTimeUnixNano: "3000000" + timeUnixNano: "1000000" + - asDouble: 9 + attributes: + - key: direction + value: + stringValue: write + startTimeUnixNano: "3000000" + timeUnixNano: "2000000" + name: vcenter.vm.vsan.throughput + unit: By/s scope: name: otelcol/vcenterreceiver version: latest