Menu

Caution

Grafana Alloy is the new name for our distribution of the OTel collector. Grafana Agent has been deprecated and is in Long-Term Support (LTS) through October 31, 2025. Grafana Agent will reach an End-of-Life (EOL) on November 1, 2025. Read more about why we recommend migrating to Grafana Alloy.

Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.

Open source

prometheus.exporter.vsphere

The prometheus.exporter.vsphere component embeds vmware_exporter to collect vSphere metrics

NOTE: We recommend to use otelcol.receiver.vcenter instead.

Usage

river
prometheus.exporter.vsphere "LABEL" {
}

Arguments

You can use the following arguments to configure the exporter’s behavior. Omitted fields take their default values.

NameTypeDescriptionDefaultRequired
vsphere_urlstringThe url of the vCenter endpoint SDKno
vsphere_userstringvCenter username.no
vsphere_passwordsecretvCenter password.no
request_chunk_sizeintNumber of managed objects to include in each request to vsphere when fetching performance counters.256no
collect_concurrencyintNumber of concurrent requests to vSphere when fetching performance counters.8no
discovery_intervaldurationInterval on which to run vSphere managed object discovery.0no
enable_exporter_metricsbooleanEnable the exporter metrics.trueno
  • Setting discovery_interval to a non-zero value will result in object discovery running in the background. Each scrape will use object data gathered during the last discovery. When this value is 0, object discovery occurs per scrape.

Exported fields

The following fields are exported and can be referenced by other components.

NameTypeDescription
targetslist(map(string))The targets that can be used to collect exporter metrics.

For example, the targets can either be passed to a discovery.relabel component to rewrite the targets’ label sets or to a prometheus.scrape component that collects the exposed metrics.

The exported targets use the configured in-memory traffic address specified by the run command.

Component health

prometheus.exporter.vsphere is only reported as unhealthy if given an invalid configuration. In those cases, exported fields retain their last healthy values.

Debug information

prometheus.exporter.vsphere does not expose any component-specific debug information.

Debug metrics

prometheus.exporter.vsphere does not expose any component-specific debug metrics.

Example

This example uses a prometheus.scrape component to collect metrics from prometheus.exporter.vsphere:

river
prometheus.exporter.vsphere "example" {
    vsphere_url      = "https://127.0.0.1:8989/sdk"
    vsphere_user     = "user"
    vsphere_password = "pass"
}

// Configure a prometheus.scrape component to collect vsphere metrics.
prometheus.scrape "demo" {
  targets    = prometheus.exporter.vsphere.example.targets
  forward_to = [ prometheus.remote_write.default.receiver ]
}

prometheus.remote_write "default" {
  endpoint {
    url = "REMOTE_WRITE_URL"
  }
}

Compatible components

prometheus.exporter.vsphere has exports that can be consumed by 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.