Open source


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

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


prometheus.exporter.vsphere "LABEL" {


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

vsphere_urlstringThe url of the vCenter endpoint SDKno
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.

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.


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

prometheus.exporter.vsphere "example" {
    vsphere_url      = ""
    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:


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.