Edit telegraf.conf to add VMware host and service fails to start

Hello,

I’ve got InfluxDB running and I’ve installed telegraf on a server and I’m trying to pull metrics from my ESXi VMware host and push to Influx, but the telegraf serve fails as soon as I edit the /etc/telegraf/telegraf.conf
file.

All I do is start by editing the 3 lines here then see if the service starts. Before I edit the service is running fine:

# # Read metrics from VMware vCenter
# [[inputs.vsphere]]
#   ## List of vCenter URLs to be monitored. These three lines must be uncommented
#   ## and edited for the plugin to work.
   vcenters = [ "https://192.168.0.2/sdk" ]
   username = "monitor"
   password = "Center123#"
#
#   ## VMs
#   ## Typical VM metrics (if omitted or empty, all metrics are collected)
#   vm_metric_include = [
#     "cpu.demand.average",
#     "cpu.idle.summation",
#     "cpu.latency.average",
#     "cpu.readiness.average",
#     "cpu.ready.summation",

What am I doing wrong do you think?

You probably just need to uncomment the table header:

[[inputs.vsphere]]

BTW, you can check the /var/log/syslog for log messages on startup, the service status isn’t very helpful.