{"id":45877676,"url":"https://github.com/tesibelda/vcstat","last_synced_at":"2026-02-27T12:49:14.673Z","repository":{"id":57649013,"uuid":"439063231","full_name":"tesibelda/vcstat","owner":"tesibelda","description":"VMware vSphere input plugin for Telegraf that gathers status and basic stats from vCenter","archived":false,"fork":false,"pushed_at":"2025-06-04T16:42:28.000Z","size":481,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-04T22:19:33.662Z","etag":null,"topics":["esxi","metrics","monitoring","telegraf-plugin","vcenter","vmware","vsphere"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tesibelda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-12-16T16:51:10.000Z","updated_at":"2025-06-04T16:42:30.000Z","dependencies_parsed_at":"2024-02-18T21:21:36.622Z","dependency_job_id":"0355dd10-9a27-4b48-8b6b-bef67f990849","html_url":"https://github.com/tesibelda/vcstat","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/tesibelda/vcstat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tesibelda%2Fvcstat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tesibelda%2Fvcstat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tesibelda%2Fvcstat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tesibelda%2Fvcstat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tesibelda","download_url":"https://codeload.github.com/tesibelda/vcstat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tesibelda%2Fvcstat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29895772,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T12:09:13.686Z","status":"ssl_error","status_checked_at":"2026-02-27T12:09:13.282Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["esxi","metrics","monitoring","telegraf-plugin","vcenter","vmware","vsphere"],"created_at":"2026-02-27T12:49:13.396Z","updated_at":"2026-02-27T12:49:14.664Z","avatar_url":"https://github.com/tesibelda.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vcstat\n\nvcstat is a VMware vSphere input plugin for [Telegraf](https://github.com/influxdata/telegraf) that gathers status and basic [stats](https://github.com/tesibelda/vcstat/blob/master/METRICS.md) from vCenter using govmomi library (in a similar way to [govc *.info](https://github.com/vmware/govmomi/blob/master/govc/USAGE.md) commands). You may use this input in parallel with Telegraf's vsphere input to complement the performance metrics it collects. With vcstat input's data you may be able to detect when a node goes from green to red, an HBA goes from link-up to link-down, to know the number of ports used by a Distributed Virtual Switch or create a basic capacity dashboard.\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/tesibelda/vcstat/raw/master/LICENSE)\n[![Go Report Card](https://goreportcard.com/badge/github.com/tesibelda/vcstat)](https://goreportcard.com/report/github.com/tesibelda/vcstat)\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/tesibelda/vcstat?display_name=release)\n\n# Compatibility\n\nLatest releases are built with a govmomi library version that supports vCenter 7.0 and 8.0 (probably also work with 6.5 and 6.7).\nUse telegraf v1.14 or above so that execd input is available. \n\n# Configuration\n\n* Download the [latest release package](https://github.com/tesibelda/vcstat/releases/latest) for your platform.\n\n* Edit vcstat.conf file as needed. Example:\n\n```toml\n[[inputs.vcstat]]\n  ## vCenter URL to be monitored and its credential\n  vcenter = \"https://vcenter.local/sdk\"\n  username = \"user@corp.local\"\n  password = \"secret\"\n  ## requests timeout. Here 0s is interpreted as the polling interval\n  # timeout = \"10s\"\n\n  ## Optional SSL Config\n  # tls_ca = \"/path/to/cafile\"\n  ## Use SSL but skip chain \u0026 host verification\n  # insecure_skip_verify = false\n\n  ## optional alias tag for internal metrics\n  # internal_alias = \"\"\n  ## Max number of objects to gather per query\n  # query_bulk_size = 100\n  ## number of intervals to skip esxcli commands for not responding hosts\n  # intervals_skip_notresponding_esxcli_hosts = 20\n\n  ## Filter clusters by name, default is no filtering\n  ## cluster names can be specified as glob patterns\n  # clusters_include = []\n  # clusters_exclude = []\n\n  ## Filter hosts by name, default is no filtering\n  ## host names can be specified as glob patterns\n  # hosts_include = []\n  # hosts_exclude = []\n\n  ## Filter VMs by name, default is no filtering\n  ## VM names can be specified as glob patterns\n  # vms_include = []\n  # vms_exclude = []\n\n  #### you may enable or disable data collection per instance type ####\n  ## collect cluster measurement (vcstat_cluster)\n  # cluster_instances = true\n  ## collect datastore measurement (vcstat_datastore)\n  # datastore_instances = false\n  ## collect host status measurement (vcstat_host)\n  # host_instances = true\n  ## collect host firewall measurement (vcstat_host_firewall)\n  # host_firewall_instances = false\n  ## collect host graphics measurement (vcstat_host_graphics)\n  # host_graphics_instances = false\n  ## collect host bus adapter measurement (vcstat_host_hba)\n  # host_hba_instances = false\n  ## collect host network interface measurement (vcstat_host_nic)\n  # host_nic_instances = false\n  ## collect host services measurement (vcstat_host_service)\n  # host_service_instances = false\n  ## collect network distributed virtual switch measurement (vcstat_net_dvs)\n  # net_dvs_instances = true\n  ## collect network distributed virtual portgroup measurement (vcstat_net_dvp)\n  # net_dvp_instances = false\n  ## collect virtual machine measurement (vcstat_vm)\n  # vm_instances = false\n```\n\n* Edit telegraf's execd input configuration as needed. Example:\n\n```\n## Gather vSphere vCenter status and basic stats\n[[inputs.execd]]\n  command = [\"/path/to/vcstat_binary\", \"--config\", \"/path/to/vcstat.conf\"]\n  signal = \"STDIN\"\n```\n\nYou can optionally tell vcstat the input's interval by adding -poll_interval the_interval parameters to the command. By default it expects 1m interval. If you want 30s interval configure it like this:\n```\n## Gather vSphere vCenter status and basic stats\n[[inputs.execd]]\n  interval = \"30s\"\n  command = [\"/path/to/vcstat_binary\", \"--config\", \"/path/to/vcstat.conf\", \"--poll_interval\", \"30s\"]\n  signal = \"STDIN\"\n```\nMetric timestamp precision will be set according to the polling interval, so it will usually be 1s.\n\n* Restart or reload Telegraf.\n\n# Quick test in your environment\n\n* Edit vcstat.conf file as needed (see above)\n\n* Run vcstat with --config argument using that file.\n```\n/path/to/vcstat --config /path/to/vcstat.conf\n```\n\n* Wait for 1 minute or press enter. You should see lines like those in the Example output below.\n\n* Note that vcstat will escape querying not connected hosts and also skip hosts for intervals_skip_notresponding_esxcli_hosts intervals if they don't respond to esxcli commands or that response takes longer than interval\n\n# Example output\n\n```plain\nvcstat_vcenter,vcenter=vcenter.local name=\"VMware vCenter Server\",num_datacenters=1i,ostype=\"linux-x64\",version=\"6.5.0\" 1653060681000000000\nvcstat_datacenter,dcname=MyDC,moid=datacenter-2,vcenter=vcenter.local num_datastores=51i,num_hosts=8i,num_networks=32i,num_clusters=1i 1653060681000000000\nvcstat_cluster,clustername=MyCluster-01,dcname=MyDC,moid=domain-c121,vcenter=vcenter.local num_cpu_cores=152i,total_cpu=342248i,total_memory=1648683421696i,effective_cpu=299032i,status=\"green\",status_code=0i,num_vms=26i,num_hosts=8i,num_effective_hosts=8i,num_cpu_threads=304i,effective_memory=1502236i 1653060681000000000\nvcstat_host,dcname=MyDC,clustername=MyCluster-01,esxhostname=myesxi01.local,moid=host-706,vcenter=vcenter.local connection_state_code=0i,memory_size=206110695424i,num_cpus=16i,num_datastores=2i,cpu_freq=2199i,status=\"green\",status_code=0i,reboot_required=false,in_maintenance_mode=false,connection_state=\"connected\",num_vms=2i 1653060681000000000\nvcstat_host_graphics,address=0000:3b:00.0,clustername=MyCluster-01,dcname=MyDC,device=NVIDIA\\ A40,esxhostname=myesxi01.local,vcenter=vcenter.local memory=\"9\",temperature=\"29\",cpu=\"3\",driver=\"510.84.01\" 1653060681000000000\nvcstat_host_graphics,address=0000:a1:00.0,clustername=MyCluster-01,dcname=MyDC,device=NVIDIA\\ A40,esxhostname=myesxi01.local,vcenter=vcenter.local driver=\"510.84.01\",memory=\"11\",temperature=\"28\",cpu=\"5\" 1653060681000000000\nvcstat_host_firewall,dcname=MyDC,clustername=MyCluster-01,esxhostname=myesxi01.local,vcenter=vcenter.local defaultaction=\"DROP\",enabled=true,loaded=true 1653060681000000000\nvcstat_host_hba,dcname=MyDC,clustername=MyCluster-01,device=vmhba0,driver=lpfc,esxhostname=myesxi01.local,vcenter=vcenter.local status=\"link-n/a\",status_code=1i 1653060681000000000\nvcstat_host_nic,dcname=MyDC,clustername=MyCluster-01,device=vmnic0,driver=ntg3,esxhostname=myesxi01.local,vcenter=vcenter.local link_status=\"Down\",link_status_code=2i 1653060681000000000\nvcstat_host_esxcli,dcname=MyDC,clustername=MyCluster-01,esxhostname=myesxi01.local,moid=host-706,vcenter=vcenter.local  responding_code=0i,response_time_ns=109185876i 1653060681000000000\nvcstat_host_service,dcname=MyDC,clustername=MyCluster-01,esxhostname=myesxi01.local,key=ntpd,vcenter=vcenter.local label=\"NTP Daemon\",policy=\"on\",required=false,running=true 1653060681000000000\nvcstat_host_service,dcname=MyDC,clustername=MyCluster-01,esxhostname=myesxi01.local,key=vpxa,vcenter=vcenter.local label=\"VMware vCenter Agent\",policy=\"on\",required=false,running=true 1653060681000000000\nvcstat_net_dvs,dcname=MyDC,dvs=DSwitch-E1,moid=dvs-e1,vcenter=vcenter.local num_hosts=1i,num_standalone_ports=0i,status=\"green\",status_code=0i,num_ports=421i,max_ports=2147483647i,pnic_capacity_ratio_for_reservation=1i 1653060682000000000\nvcstat_net_dvp,dcname=MyDC,dvp=DSwitch-E1-DVUplinks-e1,moid=dvportgroup-e1,uplink=true,vcenter=vcenter.local status=\"green\",status_code=0i,num_ports=16i 1653060682000000000\nvcstat_datastore,dcname=MyDC,dsname=DS_Departement1,moid=datastore-725,type=VMFS,vcenter=vcenter.local accessible=true,capacity=2198754820096i,freespace=730054262784i,uncommitted=20511i,maintenance_mode=\"normal\" \nvcstat_vm,clustername=MyCluster-01,dcname=MyDC,esxhostname=myesxi01.local,moid=vm-4524,vcenter.local,vmname=vmserver01 status=\"green\",status_code=0i,consolidation_needed=false,max_cpu_usage=11972i,num_eth_cards=1i,num_vdisks=2i,connection_state_code=0i,max_mem_usage=8589934592i,num_vcpus=4i,power_state_code=0i,template=false,connection_state=\"connected\",memory_size=8589934592i,power_state=\"poweredOn\" 1653060683000000000\ninternal_vcstat,vcenter=vcenter.local,vcstat_version=0.1.10 sessions_created=1i,gather_time_ns=1764839000i,notresponding_esxcli_hosts=0i 1653060683000000000\n```\n\n# Metrics\nSee [Metrics](https://github.com/tesibelda/vcstat/blob/master/METRICS.md)\n\n# Build Instructions\n\nDownload the repo\n\n    $ git clone git@github.com:tesibelda/vcstat.git\n\nbuild the \"vcstat\" binary\n\n    $ go build -o bin/vcstat cmd/main.go\n    \n (if you're using windows, you'll want to give it an .exe extension)\n \n    $ go build -o bin\\vcstat.exe cmd/main.go\n\n If you use [go-task](https://github.com/go-task/task) execute one of these\n \n    $ task linux:build\n\t$ task windows:build\n\n# Author\n\nTesifonte Belda (https://github.com/tesibelda)\n\n# Support and assitance\n\nReach out to the maintainer at one of the following places:\n\n- [GitHub issues](https://github.com/tesibelda/vcstat/issues)\n- Contact options listed on this GitHub profile\n\nIf you want to say **thank you** or/and support active development of vcstat:\n\n- Add a [GitHub Star](https://github.com/tesibelda/vcstat) to the project.\n- Write interesting articles about the project on [Dev.to](https://dev.to/), [Medium](https://medium.com/) or your personal blog.\n\n# Disclaimer\n\nThe author and maintainers are not affiliated with VMware.\nVMware is a registered trademark or trademark of VMware, Inc.\n\n# License\n\n[The MIT License (MIT)](https://github.com/tesibelda/vcstat/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftesibelda%2Fvcstat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftesibelda%2Fvcstat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftesibelda%2Fvcstat/lists"}