Menu
Grafana Cloud

Experimental

otelcol.receiver.vcenter

EXPERIMENTAL: This is an experimental component. Experimental components are subject to frequent breaking changes, and may be removed with no equivalent replacement. The stability.level flag must be set to experimental to use the component.

otelcol.receiver.vcenter accepts metrics from a vCenter or ESXi host running VMware vSphere APIs and forwards it to other otelcol.* components.

NOTE: otelcol.receiver.vcenter is a wrapper over the upstream OpenTelemetry Collector vcenter receiver from the otelcol-contrib distribution. Bug reports or feature requests will be redirected to the upstream repository, if necessary.

Multiple otelcol.receiver.vcenter components can be specified by giving them different labels.

The full list of metrics that can be collected can be found in vcenter receiver documentation.

Prerequisites

This receiver has been built to support ESXi and vCenter versions:

  • 8
  • 7.0

A “Read Only” user assigned to a vSphere with permissions to the vCenter server, cluster and all subsequent resources being monitored must be specified in order for the receiver to retrieve information about them.

Usage

alloy
otelcol.receiver.vcenter "LABEL" {
  endpoint = "VCENTER_ENDPOINT"
  username = "VCENTER_USERNAME"
  password = "VCENTER_PASSWORD"

  output {
    metrics = [...]
  }
}

Arguments

otelcol.receiver.vcenter supports the following arguments:

NameTypeDescriptionDefaultRequired
endpointstringEndpoint to a vCenter Server or ESXi host which has the SDK path enabled.yes
usernamestringUsername to use for authentication.yes
passwordstringPassword to use for authentication.yes
collection_intervaldurationDefines how often to collect metrics."1m"no
initial_delaydurationDefines how long this receiver waits before starting."1s"no
timeoutdurationDefines the timeout for the underlying HTTP client."0s"no

endpoint has the format <protocol>://<hostname>. For example, https://vcsa.hostname.localnet.

Blocks

The following blocks are supported inside the definition of otelcol.receiver.vcenter:

HierarchyBlockDescriptionRequired
tlstlsConfigures TLS for the HTTP client.no
metricsmetricsConfigures which metrics will be sent to downstream components.no
resource_attributesresource_attributesConfigures resource attributes for metrics sent to downstream components.no
debug_metricsdebug_metricsConfigures the metrics that this component generates to monitor its state.no
outputoutputConfigures where to send received telemetry data.yes

tls block

The tls block configures TLS settings used for a server. If the tls block isn’t provided, TLS won’t be used for connections to the server.

The following arguments are supported:

NameTypeDescriptionDefaultRequired
ca_filestringPath to the CA file.no
ca_pemstringCA PEM-encoded text to validate the server with.no
cert_filestringPath to the TLS certificate.no
cert_pemstringCertificate PEM-encoded text for client authentication.no
insecure_skip_verifybooleanIgnores insecure server TLS certificates.no
include_system_ca_certs_poolbooleanWhether to load the system certificate authorities pool alongside the certificate authority.falseno
insecurebooleanDisables TLS when connecting to the configured server.no
key_filestringPath to the TLS certificate key.no
key_pemsecretKey PEM-encoded text for client authentication.no
max_versionstringMaximum acceptable TLS version for connections."TLS 1.3"no
min_versionstringMinimum acceptable TLS version for connections."TLS 1.2"no
cipher_suiteslist(string)A list of TLS cipher suites that the TLS transport can use.[]no
reload_intervaldurationThe duration after which the certificate is reloaded."0s"no
server_namestringVerifies the hostname of server certificates when set.no

If the server doesn’t support TLS, you must set the insecure argument to true.

To disable tls for connections to the server, set the insecure argument to true.

If reload_interval is set to "0s", the certificate never reloaded.

The following pairs of arguments are mutually exclusive and can’t both be set simultaneously:

  • ca_pem and ca_file
  • cert_pem and cert_file
  • key_pem and key_file

If cipher_suites is left blank, a safe default list is used. See the Go TLS documentation for a list of supported cipher suites.

metrics block

NameTypeDescriptionDefaultRequired
vcenter.cluster.cpu.effectivemetricEnables the vcenter.cluster.cpu.effective metric.trueno
vcenter.cluster.cpu.usagemetricEnables the vcenter.cluster.cpu.usage metric.trueno
vcenter.cluster.host.countmetricEnables the vcenter.cluster.host.count metric.trueno
vcenter.cluster.memory.effectivemetricEnables the vcenter.cluster.memory.effective metric.trueno
vcenter.cluster.memory.limitmetricEnables the vcenter.cluster.memory.limit metric.trueno
vcenter.cluster.vm.countmetricEnables the vcenter.cluster.vm.count metric.trueno
vcenter.cluster.vm_template.countmetricEnables the vcenter.cluster.vm_template.count metric.trueno
vcenter.cluster.vsan.congestionsmetricEnables the vcenter.cluster.vsan.congestions metric.trueno
vcenter.cluster.vsan.latency.avgmetricEnables the vcenter.cluster.vsan.latency.avg metric.trueno
vcenter.cluster.vsan.operationsmetricEnables the vcenter.cluster.vsan.operations metric.trueno
vcenter.cluster.vsan.throughputmetricEnables the vcenter.cluster.vsan.throughput metric.trueno
vcenter.datacenter.cluster.countmetricEnables the vcenter.datacenter.cluster.count metric.trueno
vcenter.datacenter.cpu.limitmetricEnables the vcenter.datacenter.cpu.limit metric.trueno
vcenter.datacenter.datastore.countmetricEnables the vcenter.datacenter.datastore.count metric.trueno
vcenter.datacenter.disk.spacemetricEnables the vcenter.datacenter.disk.space metric.trueno
vcenter.datacenter.host.countmetricEnables the vcenter.datacenter.host.count metric.trueno
vcenter.datacenter.memory.limitmetricEnables the vcenter.datacenter.memory.limit metric.trueno
vcenter.datacenter.vm.countmetricEnables the vcenter.datacenter.vm.count metric.trueno
vcenter.datastore.disk.usagemetricEnables the vcenter.datastore.disk.usage metric.trueno
vcenter.datastore.disk.utilizationmetricEnables the vcenter.datastore.disk.utilization metric.trueno
vcenter.host.cpu.capacitymetricEnables the vcenter.host.cpu.capacity metric.trueno
vcenter.host.cpu.reservedmetricEnables the vcenter.host.cpu.reserved metric.trueno
vcenter.host.cpu.usagemetricEnables the vcenter.host.cpu.usage metric.trueno
vcenter.host.cpu.utilizationmetricEnables the vcenter.host.cpu.utilization metric.trueno
vcenter.host.disk.latency.avgmetricEnables the vcenter.host.disk.latency.avg metric.trueno
vcenter.host.disk.latency.maxmetricEnables the vcenter.host.disk.latency.max metric.trueno
vcenter.host.disk.throughputmetricEnables the vcenter.host.disk.throughput metric.trueno
vcenter.host.memory.usagemetricEnables the vcenter.host.memory.usage metric.trueno
vcenter.host.memory.utilizationmetricEnables the vcenter.host.memory.utilization metric.trueno
vcenter.host.network.packet.ratemetricEnables the vcenter.host.network.packet.rate metric.trueno
vcenter.host.network.packet.error.ratemetricEnables the vcenter.host.network.packet.error.rate metric.trueno
vcenter.host.network.packet.drop.ratemetricEnables the vcenter.host.network.packet.drop.rate metric.trueno
vcenter.host.network.throughputmetricEnables the vcenter.host.network.throughput metric.trueno
vcenter.host.network.usagemetricEnables the vcenter.host.network.usage metric.trueno
vcenter.host.vsan.cache.hit_ratemetricEnables the vcenter.host.vsan.cache.hit_rate metric.trueno
vcenter.host.vsan.congestionsmetricEnables the vcenter.host.vsan.congestions metric.trueno
vcenter.host.vsan.latency.avgmetricEnables the vcenter.host.vsan.latency.avg metric.trueno
vcenter.host.vsan.operationsmetricEnables the vcenter.host.vsan.operations metric.trueno
vcenter.host.vsan.throughputmetricEnables the vcenter.host.vsan.throughput metric.trueno
vcenter.resource_pool.cpu.sharesmetricEnables the vcenter.resource_pool.cpu.shares metric.trueno
vcenter.resource_pool.cpu.usagemetricEnables the vcenter.resource_pool.cpu.usage metric.trueno
vcenter.resource_pool.memory.balloonedmetricEnables the vcenter.resource_pool.memory.ballooned metric.trueno
vcenter.resource_pool.memory.grantedmetricEnables the vcenter.resource_pool.memory.granted metric.trueno
vcenter.resource_pool.memory.sharesmetricEnables the vcenter.resource_pool.memory.shares metric.trueno
vcenter.resource_pool.memory.swappedmetricEnables the vcenter.resource_pool.memory.swapped metric.trueno
vcenter.resource_pool.memory.usagemetricEnables the vcenter.resource_pool.memory.usage metric.trueno
vcenter.vm.cpu.readinessmetricEnables the vcenter.vm.cpu.readiness metric.trueno
vcenter.vm.cpu.usagemetricEnables the vcenter.vm.cpu.usage metric.trueno
vcenter.vm.cpu.utilizationmetricEnables the vcenter.vm.cpu.utilization metric.trueno
vcenter.vm.disk.latency.avgmetricEnables the vcenter.vm.disk.latency.avg metric.trueno
vcenter.vm.disk.latency.maxmetricEnables the vcenter.vm.disk.latency.max metric.trueno
vcenter.vm.disk.throughputmetricEnables the vcenter.vm.disk.throughput metric.trueno
vcenter.vm.disk.usagemetricEnables the vcenter.vm.disk.usage metric.trueno
vcenter.vm.disk.utilizationmetricEnables the vcenter.vm.disk.utilization metric.trueno
vcenter.vm.memory.balloonedmetricEnables the vcenter.vm.memory.ballooned metric.trueno
vcenter.vm.memory.swappedmetricEnables the vcenter.vm.memory.swapped metric.trueno
vcenter.vm.memory.swapped_ssdmetricEnables the vcenter.vm.memory.swapped_ssd metric.trueno
vcenter.vm.memory.usagemetricEnables the vcenter.vm.memory.usage metric.trueno
vcenter.vm.memory.utilizationmetricEnables the vcenter.vm.memory.utilization metric.trueno
vcenter.vm.network.packet.ratemetricEnables the vcenter.vm.network.packet.rate metric.trueno
vcenter.vm.network.packet.drop.ratemetricEnables the vcenter.vm.network.packet.drop.rate metric.trueno
vcenter.vm.network.throughputmetricEnables the vcenter.vm.network.throughput metric.trueno
vcenter.vm.network.usagemetricEnables the vcenter.vm.network.usage metric.trueno
vcenter.vm.vsan.latency.avgmetricEnables the vcenter.vm.vsan.latency.avg metric.trueno
vcenter.vm.vsan.operationsmetricEnables the vcenter.vm.vsan.operations metric.trueno
vcenter.vm.vsan.throughputmetricEnables the vcenter.vm.vsan.throughput metric.trueno

metric block

NameTypeDescriptionDefaultRequired
enabledbooleanWhether to enable the metric.trueno

resource_attributes block

NameTypeDescriptionDefaultRequired
vcenter.datacenter.nameresource_attributeEnables the vcenter.datacenter.name resource attribute.trueno
vcenter.cluster.nameresource_attributeEnables the vcenter.cluster.name resource attribute.trueno
vcenter.datastore.nameresource_attributeEnables the vcenter.cluster.resource_pool resource attribute.trueno
vcenter.host.nameresource_attributeEnables the vcenter.host.name resource attribute.trueno
vcenter.resource_pool.inventory_pathresource_attributeEnables the vcenter.resource_pool.inventory_path resource attribute.trueno
vcenter.resource_pool.nameresource_attributeEnables the vcenter.resource_pool.name resource attribute.trueno
vcenter.virtual_app.inventory_pathresource_attributeEnables the vcenter.virtual_app.inventory_path resource attribute.trueno
vcenter.virtual_app.nameresource_attributeEnables the vcenter.virtual_app.name resource attribute.trueno
vcenter.vm.idresource_attributeEnables the vcenter.vm.id resource attribute.trueno
vcenter.vm.nameresource_attributeEnables the vcenter.vm.name resource attribute.trueno
vcenter.vm_template.idresource_attributeEnables the vcenter.vm_template.id resource attribute.trueno
vcenter.vm_template.nameresource_attributeEnables the vcenter.vm_template.name resource attribute.trueno

resource_attribute block

NameTypeDescriptionDefaultRequired
enabledbooleanWhether to enable the resource attribute.trueno

debug_metrics block

The debug_metrics block configures the metrics that this component generates to monitor its state.

The following arguments are supported:

NameTypeDescriptionDefaultRequired
disable_high_cardinality_metricsbooleanWhether to disable certain high cardinality metrics.trueno
levelstringControls the level of detail for metrics emitted by the wrapped collector."detailed"no

disable_high_cardinality_metrics is the Grafana Alloy equivalent to the telemetry.disableHighCardinalityMetrics feature gate in the OpenTelemetry Collector. It removes attributes that could cause high cardinality metrics. For example, attributes with IP addresses and port numbers in metrics about HTTP and gRPC connections are removed.

Note

If configured, disable_high_cardinality_metrics only applies to otelcol.exporter.* and otelcol.receiver.* components.

level is the Alloy equivalent to the telemetry.metrics.level feature gate in the OpenTelemetry Collector. Possible values are "none", "basic", "normal" and "detailed".

output block

The output block configures a set of components to forward resulting telemetry data to.

The following arguments are supported:

NameTypeDescriptionDefaultRequired
logslist(otelcol.Consumer)List of consumers to send logs to.[]no
metricslist(otelcol.Consumer)List of consumers to send metrics to.[]no
traceslist(otelcol.Consumer)List of consumers to send traces to.[]no

You must specify the output block, but all its arguments are optional. By default, telemetry data is dropped. Configure the metrics, logs, and traces arguments accordingly to send telemetry data to other components.

Exported fields

otelcol.receiver.vcenter does not export any fields.

Component health

otelcol.receiver.vcenter is only reported as unhealthy if given an invalid configuration.

Debug information

otelcol.receiver.vcenter does not expose any component-specific debug information.

Example

This example forwards received telemetry data through a batch processor before finally sending it to an OTLP-capable endpoint:

alloy
otelcol.receiver.vcenter "default" {
  endpoint = "http://localhost:15672"
  username = "otelu"
  password = "password"

  output {
    metrics = [otelcol.processor.batch.default.input]
  }
}

otelcol.processor.batch "default" {
  output {
    metrics = [otelcol.exporter.otlp.default.input]
  }
}

otelcol.exporter.otlp "default" {
  client {
    endpoint = sys.env("OTLP_ENDPOINT")
  }
}

Compatible components

otelcol.receiver.vcenter can accept arguments from the following components:

Note

Connecting some components may not be sensible or components may require further configuration to make the connection work correctly. Refer to the linked documentation for more details.