content/shared/influxdb-v2/monitor-alert/templates/infrastructure/vshpere.md
Use the vSphere Dashboard for InfluxDB v2 template to monitor your vSphere host. First, apply the template, and then view incoming data. This template uses the Docker input plugin to collect metrics stored in InfluxDB and display these metrics in a dashboard.
The Docker Monitoring template includes the following:
vspherebucketUse the influx CLI to run the following command:
influx apply -f https://raw.githubusercontent.com/influxdata/community-templates/master/vsphere/vsphere.yml
For more information, see influx apply.
{{% note %}}
Ensure your influx CLI is configured with your account credentials and that configuration is active. For more information, see influx config.
{{% /note %}}
Install Telegraf on a server with network access to both the vSphere host and InfluxDB v2 API.
In your Telegraf configuration file (telegraf.conf), do the following:
telegraf bucket. See how to view tokens.export INFLUX_BUCKET=vsphereusername and password as variables:
vcenters = [ "https://$VSPHERE_HOST/sdk" ]
username = "$vsphere-user"
password = "$vsphere-password"
In the InfluxDB user interface (UI), select Dashboards in the left navigation.
{{< nav-icon "dashboards" >}}
Open the vsphere dashboard to start monitoring.