Monitor vSphere
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:
- 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.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:- 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"
View incoming data
In the InfluxDB user interface (UI), select Boards (Dashboards).
Boards
Dashboards
Open the vsphere dashboard to start monitoring.