# Vsphere module delivers inaccurate data

**URL:** https://discuss.elastic.co/t/vsphere-module-delivers-inaccurate-data/111708
**Category:** Beats
**Tags:** metricbeat
**Created:** [December 14, 2017, 8:21am UTC](https://discuss.elastic.co/t/vsphere-module-delivers-inaccurate-data/111708 "2017-12-14T08:21:33Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Robert\_Schultz](https://avatars.discourse-cdn.com/v4/letter/r/49beb7/32.png) [@Robert\_Schultz](https://discuss.elastic.co/u/Robert_Schultz)
#### Post date: [December 14, 2017, 8:21am UTC](https://discuss.elastic.co/t/vsphere-module-delivers-inaccurate-data/111708/1 "2017-12-14T08:21:33Z")

</div>

Hello everyone!

I am fetching vsphere metrics from 2 different vsphere hosts, containing 5 different datacenter.

```
- module: vsphere
  metricsets: ["host" , "virtualmachine"]
  period: 10s
  hosts: ["https://vcenter.host/sdk"]
  username: "elkmonitor"
  password: " **********"
  insecure: true
 fields:
    environment: hq

```

While this works pretty well, I discovered that some, not all, of my virtual machines change their recorded datacenter within the 10 seconds polling period.

```
vsphere.virtualmachine.name.keyword: host0123.my.domain.com
vsphere.virtualmachine.datacenter.keyword: Datacenter_A

```

turns into

```
vsphere.virtualmachine.name.keyword: host0123.my.domain.com
vsphere.virtualmachine.datacenter.keyword: Datacenter_B

```

and back with the next poll. I can assure you there is no vmotion going on in between. The VMs are not duplicate.  
This applies to the virtualmachine metricset, host metricset is not affected, for the datastore metricset I cannot tell as we have the duplicate datastore names within the datacenters.

We are using vsphere Version 6.5.0 Build 4602587.  
Metricbeat is running with version 6.0.1

Has anybody seen something like this before?

---

<div class="post-metadata">

### Author: ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)
#### Post date: [December 17, 2017, 10:34am UTC](https://discuss.elastic.co/t/vsphere-module-delivers-inaccurate-data/111708/2 "2017-12-17T10:34:50Z")

</div>

There were recently quite some large changes to the vsphere module like [https://github.com/elastic/beats/pull/4883](https://github.com/elastic/beats/pull/4883) to fix some other issues. I wonder if this change potentially also fixed the problem above? This change did not make it into 6.1 but will be in 6.2 and is in master. Any chance you could try a snapshot build of metricbeat?

---

<div class="post-metadata">

### Author: ![Robert\_Schultz](https://avatars.discourse-cdn.com/v4/letter/r/49beb7/32.png) [@Robert\_Schultz](https://discuss.elastic.co/u/Robert_Schultz)
#### Post date: [December 27, 2017, 3:23pm UTC](https://discuss.elastic.co/t/vsphere-module-delivers-inaccurate-data/111708/3 "2017-12-27T15:23:04Z")

</div>

Hi!

If you provide me a snapshot build (deb64 is preferred), I will be happy to try it!  
Sorry for the delay, was not on the topic a few days!

---

<div class="post-metadata">

### Author: ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)
#### Post date: [December 28, 2017, 2:43am UTC](https://discuss.elastic.co/t/vsphere-module-delivers-inaccurate-data/111708/4 "2017-12-28T02:43:00Z")

</div>

@Robert_Schultz Here you go: [https://beats-package-snapshots.s3.amazonaws.com/index.html?prefix=metricbeat/](https://beats-package-snapshots.s3.amazonaws.com/index.html?prefix=metricbeat/)

---

<div class="post-metadata">

### Author: ![Robert\_Schultz](https://avatars.discourse-cdn.com/v4/letter/r/49beb7/32.png) [@Robert\_Schultz](https://discuss.elastic.co/u/Robert_Schultz)
#### Post date: [December 28, 2017, 1:09pm UTC](https://discuss.elastic.co/t/vsphere-module-delivers-inaccurate-data/111708/5 "2017-12-28T13:09:10Z")

</div>

Well, that kind of solved the problem, as the field "vsphere.virtualmachine.datacenter.keyword" has vanished 🙂

I was interested in aggregated vsphere cluster statistics, the "datacenter" value was not what I actually needed, but I guess I can work with filters now 😃

Thanks for the snapshot, this works for me now, at least I don't see inaccurate information currently.

---

<div class="post-metadata">

### Author: ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)
#### Post date: [January 3, 2018, 10:57pm UTC](https://discuss.elastic.co/t/vsphere-module-delivers-inaccurate-data/111708/6 "2018-01-03T22:57:16Z")

</div>

Good to hear and thanks for testing. If you miss some fields, best open a feature request on Github.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [January 31, 2018, 10:57pm UTC](https://discuss.elastic.co/t/vsphere-module-delivers-inaccurate-data/111708/7 "2018-01-31T22:57:18Z")

</div>

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