Vsphere metric in windows trying to connect on localhost address

Hi!!!
I have installed and enabled vsphere metricbeat module on my vcenter server.
I have configured vsphere.yml as below.
'''''metricbeat.modules:

  • module: vsphere
    enabled: true
    metricsets: ["datastore", "host", "virtualmachine"]
    period: 10s
    hosts: ["https://vcenterserver/sdk"]

    username: "administrator@vsphere.local"
    password: "password"

    If insecure is true, don't verify the server's certificate chain

    insecure: false

    Get custom fields when using virtualmachine metric set. Default false.

    get_custom_fields: false

''''

But when I start metricbeat service its logs that vsphere module trying connect vCenter server at localhost address as below.
'Error fetching data for metricset vsphere.virtualmachine: error in NewClient: Post "https://localhost/sdk":' even if I have configured correct vcenter address in vsphere.yml file.

This is the address from default configuration. Can you make sure you edit the correct configuration for the module?

C.

Hi!!

Yes, I have edited vsphere.yml file from c:\ProgramData\Elastic\Beats\metricbeat\modules.d\vsphere.yml.

below is the configuration in yml file.
"module: vsphere
enabled: true
metricsets: ["datastore", "host", "virtualmachine"]
period: 10s
hosts: ["https://vcenterserverfqdn/sdk"]

username: "administrator@vsphere.local"
password: "password"

If insecure is true, don't verify the server's certificate chain
insecure: false

Get custom fields when using virtualmachine metric set. Default false.
get_custom_fields: false

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.