3.0 KiB
title | description | menu | weight | ||||||
---|---|---|---|---|---|---|---|---|---|
Monitor vSphere | Use the [vSphere Dashboard for InfluxDB v2 template](https://github.com/influxdata/community-templates/tree/master/vsphere) to monitor your vSphere host. |
|
206 |
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](/{{< latest "telegraf" >}}/plugins//#docker) to collect metrics stored in InfluxDB and display these metrics in a dashboard.
The Docker Monitoring template includes the following:
- one dashboard: vsphere
- one bucket:
vsphere
- label: vsphere
- one Telegraf configuration: InfluxDB v2 output plugin, vSphere input plugin
- one variable:
bucket
Apply the template
-
Use 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](/{{< latest "telegraf" >}}/introduction/installation/) 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:- Set the following environment variables:
- INFLUX_TOKEN: Token must have permissions to read Telegraf configurations and write data to the
telegraf
bucket. See how to view tokens. - INFLUX_ORG: Name of your organization. See how to view your organization.
- INFLUX_HOST: Your InfluxDB host URL, for example, localhost, a remote instance, or InfluxDB Cloud.
- INFLUX_BUCKET: Bucket to store data in. To use the bucket included, you must export the variable:
export INFLUX_BUCKET=vsphere
- INFLUX_TOKEN: Token must have permissions to read Telegraf configurations and write data to the
- Set the following environment variables:
-
- Set the host address to the vSphere and provide the
username
andpassword
as variables:vcenters = [ "https://$VSPHERE_HOST/sdk" ] username = "$vsphere-user" password = "$vsphere-password"
- Set the host address to the vSphere and provide the
View incoming data
-
In the InfluxDB user interface (UI), select Dashboards in the left navigation.
{{< nav-icon "dashboards" >}}
-
Open the vsphere dashboard to start monitoring.