influxdata / influxdata/telegraf
Implementing VM disk usage and disk provisioned to Telegraf vSphere plugin
- Dominant language
- Go
- Stars
- 17.8k
- Forks
- 5.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 161
Description
## Feature Request
Current documentation under vSphere plugin states that the metrics should be present but they appear not to be

vSphere version used; 6.5
In telegraf vsphere-stats.conf;
vm_metric_include = []
host_metric_include = []
cluster_metric_include = []
datastore_metric_exclude = []
Current version of Telegraf does not include any VM disk capacity metrics [1] but are available at vSphere [3]. This would appear to be true at code level as well but i could be wrong [5][6], issue could be that Telegraf uses govmomi VIM25 functions to query data and those just don't include VM disk provisioned/usage data. Solution would be to implement govmomi SMS (storage management system) library to Telegraf, those metrics should be available with vmname going by VDC SMS API documentation [4].
Terminology; VIM Virtualized Infrastructure Manager, SMS Storage Management System
Resources referenced;
[1] Telegraf vSphere plugin; https://github.com/influxdata/telegraf/tree/master/plugins/inputs/vsphere
[2] Underlying library used to make API calls to vSphere; https://github.com/vmware/govmomi
[3] vSphere 6.5 available metrics https://docs.vmware.com/en/VMware-vSphere/6.5/vsphere-esxi-vcenter-server-65-monitoring-performance-guide.pdf
[4] VDC SMS API https://vdc-repo.vmware.com/vmwb-repository/dcr-public/28141950-ce92-4e58-9d03-d85d13a72d59/f401aecb-6415-4dfc-88a4-546f5db4528b/doc/result-contextEntity_relationships.html
[5] Telegraf vSphere code https://github.com/influxdata/telegraf/blob/master/plugins/inputs/vsphere/vsphere.go
### Use case:
These 2 metrics are crucial to set up a proper VM resource utilization monitoring in Grafana for large amount of VM's (dynamic boards).
Contributor guide
Research direction
Start with plugins/inputs/vsphere and the referenced vsphere.go implementation, then review how govmomi currently queries vSphere data. Investigate whether the govmomi SMS API exposes VM disk provisioned and usage metrics with the VM name. Done means the Telegraf vSphere plugin collects and documents both metrics for supported vSphere versions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100