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.
prometheus.exporter.vsphere (deprecated)
Caution
Starting with release v0.40,prometheus.exporter.vsphere
is deprecated. Consider usingotelcol.receiver.vcenter
instead.prometheus.exporter.vsphere
will be removed in a future release.
The prometheus.exporter.vsphere
component embeds vmware_exporter
to collect vSphere metrics.
NOTE: We recommend to use otelcol.receiver.vcenter instead.
Usage
prometheus.exporter.vsphere "LABEL" {
}
Arguments
You can use the following arguments to configure the exporter’s behavior. Omitted fields take their default values.
Name | Type | Description | Default | Required |
---|---|---|---|---|
vsphere_url | string | The url of the vCenter endpoint SDK | no | |
vsphere_user | string | vCenter username. | no | |
vsphere_password | secret | vCenter password. | no | |
request_chunk_size | int | Number of managed objects to include in each request to vsphere when fetching performance counters. | 256 | no |
collect_concurrency | int | Number of concurrent requests to vSphere when fetching performance counters. | 8 | no |
discovery_interval | duration | Interval on which to run vSphere managed object discovery. | 0 | no |
enable_exporter_metrics | boolean | Enable the exporter metrics. | true | no |
- 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.
Name | Type | Description |
---|---|---|
targets | list(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
:
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:
- Components that consume Targets
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.