# Get\_custom\_fields of vsphere.yml of metricbeat?

**URL:** https://discuss.elastic.co/t/get-custom-fields-of-vsphere-yml-of-metricbeat/350809
**Category:** Beats
**Tags:** metricbeat
**Created:** [January 11, 2024, 2:57am UTC](https://discuss.elastic.co/t/get-custom-fields-of-vsphere-yml-of-metricbeat/350809 "2024-01-11T02:57:23Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![morry48](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/morry48/32/130699_2.png) [@morry48](https://discuss.elastic.co/u/morry48)
#### Post date: [January 11, 2024, 2:57am UTC](https://discuss.elastic.co/t/get-custom-fields-of-vsphere-yml-of-metricbeat/350809/1 "2024-01-11T02:57:23Z")

</div>

Does anyone know how to edit the area of "get\_custom\_fields" in the vsphere.yml(vsphere module) of metricbeat?  
I'm currently using version 7.7.0 and am wondering about how to configure the "get\_custom\_fields" to filter the information collected from vsphere platform precisely.

I never set it before. Is there any basic configuration format for reference?

---

<div class="post-metadata">

### Author: ![yago82](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yago82/32/97755_2.png) [@yago82](https://discuss.elastic.co/u/yago82)
#### Post date: [January 13, 2024, 9:37am UTC](https://discuss.elastic.co/t/get-custom-fields-of-vsphere-yml-of-metricbeat/350809/2 "2024-01-13T09:37:31Z")

</div>

Hi,

Example:

```auto
metricbeat.modules:
- module: vsphere
  enabled: true
  metricsets: ["datastore", "host", "virtualmachine"]
  period: 10s
  hosts: ["https://localhost/sdk"]

  username: "user"
  password: "password"
  # If insecure is true, don't verify the server's certificate chain
  insecure: false

```

link to documentation:

> **[vSphere module | Metricbeat Reference \[8.11\] | Elastic](https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-module-vsphere.html#_example_configuration_63)**

Regards

---

<div class="post-metadata">

### Author: ![morry48](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/morry48/32/130699_2.png) [@morry48](https://discuss.elastic.co/u/morry48)
#### Post date: [January 15, 2024, 5:28am UTC](https://discuss.elastic.co/t/get-custom-fields-of-vsphere-yml-of-metricbeat/350809/3 "2024-01-15T05:28:12Z")

</div>

Thank you yago82.  
However, what I need is the content of "get\_custom\_fields".  
I already knew the basic configuration of vsphere module and its metricsets as mentioned in your reply, and also the official documentation.

---

<div class="post-metadata">

### Author: ![yago82](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yago82/32/97755_2.png) [@yago82](https://discuss.elastic.co/u/yago82)
#### Post date: [January 15, 2024, 9:03am UTC](https://discuss.elastic.co/t/get-custom-fields-of-vsphere-yml-of-metricbeat/350809/4 "2024-01-15T09:03:11Z")

</div>

> [@morry48](#):
>
> get\_custom\_fields

Hi,

probably you have to set the `get_custom_fields` option to `true`. By default, it's set to `false` .

```auto
 username: "user"
  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**

```

Regards

---

<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: [February 12, 2024, 11:04am UTC](https://discuss.elastic.co/t/get-custom-fields-of-vsphere-yml-of-metricbeat/350809/5 "2024-02-12T11:04:04Z")

</div>

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