cblomart / vsphere-graphite

VMware vSphere stats to storage backends as graphite, influxdb, elasticsearch or prometheus
MIT License
62 stars 21 forks source link

DataCenters Stats?? #19

Closed pr-acassera closed 7 years ago

pr-acassera commented 7 years ago

If I have different datacenters in the hierarchy for the vcenter instance, do I need to specify the datacenter to get stats for objects in a specific datacenter? In my lab I able to poll stats but I have a single vcenter with a single DC. In another environment I cannot poll stats I get 0 query results from the vcenter instance. The only difference is that I have multiple datacenters defined on the one vcenter server where I get 0 query results.

cblomart commented 7 years ago

You should not need to provide a datacenter. Vsphere-graphite will poll for all defined stats an objects defined in the config.

I need to check if the datacenter is part of the tags (I don’t think so): you could the query vms from a specific datacenter.

Envoyé de mon iPhone

Le 17 oct. 2017 à 01:58, pr-acassera notifications@github.com a écrit :

If I have different datacenters in the hierarchy for the vcenter instance, do I need to specify the datacenter to get stats for objects in a specific datacenter? In my lab I able to poll stats but I have a single vcenter with a single DC. In another environment I cannot poll stats I get 0 query results from the vcenter instance. The only difference is that I have multiple datacenters defined on the one vcenter server where I get 0 query results.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

pr-acassera commented 7 years ago

okay I must be missing something else.

cblomart commented 7 years ago

Do you have a sample of your config? Could you tel which rights you set the vsphere-graphite user and at which level?

pr-acassera commented 7 years ago

By the way thank you for writing the code and making is available. Below is the json file. I am using the administrator account right now on Vsphere and I am running this from root. I reduced the metrics to just try to get data. Below that is the response I get.

{ "Domain": ".vsphere.local", "Interval": 60, "VCenters": [ { "Username": "administrator@vsphere.local", "Password": "Password", "Hostname": "10.0.153.225" }

],
"Backend":{
    "Type": "influxdb",
    "Hostname": "",
    "Username": "vm",
    "Password": "password",
    "Database": "vmware_performance",
    "Port": 8086
},
"Metrics": [
    {
        "ObjectType": [ "VirtualMachine", "HostSystem" ],
        "Definition": [
            { "Metric": "cpu.usage.average", "Instances": ""}
        ]
    }
]

}

root@monitor-host:/# vsphere-graphite 2017/10/17 13:28:21 Starting daemon: vsphere-graphite 2017/10/17 13:28:21 connecting to vcenter: 10.0.153.225 2017/10/17 13:28:21 Intializing influxdb backend 2017/10/17 13:28:21 Retrieving metrics 2017/10/17 13:28:21 Setting up query inventory of vcenter: 10.0.153.225 2017/10/17 13:28:21 connecting to vcenter: 10.0.153.225 2017/10/17 13:28:21 Issuing 194 queries to vcenter 10.0.153.225 requesting 194 metrics. 2017/10/17 13:28:22 No result returned by queries. 2017/10/17 13:28:22 Got 0 resluts from 10.0.153.225 with 0 values 2017/10/17 13:28:22 disconnecting from vcenter: 10.0.153.225

cblomart commented 7 years ago

Apparently duplicate of #18

As it doesn't happen with the vcenter i have: i wasn't able to reproduce it somewhere (time & ressources).

Seems like it will be needed somehow... If anyone knows of a publicly availabale vcenter ;-P

pr-acassera commented 7 years ago

From my working vcenter with a single DC and the vcenter that I cannot get data from I get different results on govc:

root@ubuntu-1:/home/# govc ls /Lab-DC/vm /Lab-DC/network /Lab-DC/host /Lab-DC/datastore

root@monitor-host:/etc# govc ls /BethPage /WebAir

It is expecting the DC in the query to get the individual component data?

pr-acassera commented 7 years ago

Tested against another environment with a single datacenter running 6.5 and it polled fine.

cblomart commented 7 years ago

What was the version of vcenter before?

Envoyé de mon iPhone

Le 19 oct. 2017 à 15:27, pr-acassera notifications@github.com a écrit :

Tested against another environment with a single datacenter running 6.5 and it polled fine.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

pr-acassera commented 7 years ago

Here is what I tested so far. I am going to add an additional DC in the lab and see what happens.

Tested single DC 6.0 is working in the lab Tested two DC 6.0 no query results. Tested single DC 6.5 working fine.

pr-acassera commented 7 years ago

Sorry to have wasted your time over the past few weeks. Looks like the infrastructure was pointing to older dated time servers. Update the time servers and now I am getting data. There was a time skew. Thank you very much for your help.

cblomart commented 7 years ago

Didn’t do much.

Happy that this works!!! :-)

I shall ask in the linked post if time is synced. (Or I could request server time on init to account for time skew)

Le 22 oct. 2017 à 21:56, pr-acassera notifications@github.com a écrit :

Sorry to have wasted your time over the past few weeks. Looks like the infrastructure was pointing to older dated time servers. Update the time servers and now I am getting data. There was a time skew. Thank you very much for your help.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

pr-acassera commented 7 years ago

I would suggest making the time skew request. So if the monitor instance or server is out of time skew with the server you might get a message or log entry indicating this.