There's vsphere module in the metricbeat to pull data, as described in document here.
I can successfuly acquire information from a single host, such as vCenter server. However, when I try to acquire data from more than one vsphere host, the metricbeat not only failed to pull data but also stopped working.
Here's the codes that i utilized in the vsphere.yml:
- module: vsphere
metricsets:
- datastore
- host
- virtualmachine
period: 10s
hosts: ["https://<myvcenterIP>/sdk"]
username: "<myvcenteraccount>"
password: "<myvcenteraccount_pwd>"
# If insecure is true, don't verify the server's certificate chain
insecure: true
# Get custom fields when using virtualmachine metric set. Default false.
# get_custom_fields: false
- module: vsphere
metricsets:
- datastore
- host
- virtualmachine
period: 10s
hosts: ["https://<myesxihostIP>/sdk"]
username: "<myesxihostaccount>"
password: "myesxihostaccount_pwd>"
# If insecure is true, don't verify the server's certificate chain
insecure: true
# Get custom fields when using virtualmachine metric set. Default false.
# get_custom_fields: false
Does anyone know the correct way to achieve data acquiring from multiple vsphere hosts?
B.T.W
when i try to get more "metricset", it seemed that only the default "datastore", "host" and "virtualmachine" are available, therefore it's meaningless to invent something like "vmhardware" or "vsandatastore" to use directly. Is there any more metricsets that can work?