Oxalide / vsphere-influxdb-go

Collect VMware vSphere, vCenter and ESXi performance metrics and send them to InfluxDB
GNU General Public License v3.0
216 stars 61 forks source link

Grafana integration #73

Closed Croc2828 closed 6 years ago

Croc2828 commented 6 years ago

Hello all !

Sorry to disturb with my issue : I'm able to collect the vcenter information, the influxdb have record on it so I assume it's ok. In Grafana, I just imported the json dashboard, and configured it to use the influx database name. The problem here is that the graph remains empty. I think I'm missing something...

Can you please help ? :)

Croc2828 commented 6 years ago

In the VARIABLES, I've check the query and execute it on the influx itself, and it return nothing :

InfluxDB shell version: 1.5.1

use VMWARE Using database VMWARE SHOW TAG VALUES FROM "virtualmachine" with key = "host"

I definitely miss something...

MicKBfr commented 6 years ago

Hello,

could you try SHOW TAG VALUES FROM "virtualmachine" WITH KEY = "name" Or SHOW TAG VALUES FROM "vsphere_virtualmachine" WITH KEY = "name"

sofixa commented 6 years ago

@Croc2828 Can you post your config file (or the output from running with -debug), plus the (sanitized) output from:

SHOW DATABASES
SHOW MEASUREMENTS

(the second one might take some time if you have a lot of data on your InfluxDB)

There is probably something going on with database name / prefix.

Adrian

Croc2828 commented 6 years ago

Dear all,

Thanks for the following up 👍 @MicKBfr : The second request is working ! But the SHOW TAG VALUES FROM "vsphere_virtualmachine" WITH KEY = "name" where "host" =~ /^$vCenter$/ return anything.

@sofixa :

debug.txt

SHOW DATABASES name: databases name _internal VMWARE

use VMWARE Using database VMWARE SHOW MEASUREMENTS name: measurements name vsphere_cpu vsphere_datastore vsphere_disk vsphere_hostsystem vsphere_net vsphere_resourcepool vsphere_virtualmachine

Thanks for the support !!!

Croc2828 commented 6 years ago

Here is the settings of the dashboard too, I'm not quiet sure that the query for the vcenter is right.

screen shot 2018-04-09 at 11 36 43
Croc2828 commented 6 years ago

I've just correct the $vcenter and $vmname variable now. The output are now ok, but I still don't see any data in Grafana.

Croc2828 commented 6 years ago

Hello there,

There is definitely something wrong with the prefix. I've just change the table value and now it's working on GRAFANA. I'm going to remove the prefix from the json config file and let you know.

screen shot 2018-04-09 at 11 49 54
Croc2828 commented 6 years ago

Ok, I've remove the prefix from the json config file and now it's working ! Thanks for the support.