# How to create a custom field in metricbeat?

**URL:** https://discuss.elastic.co/t/how-to-create-a-custom-field-in-metricbeat/55434
**Category:** Beats
**Tags:** metricbeat
**Created:** [July 13, 2016, 6:17pm UTC](https://discuss.elastic.co/t/how-to-create-a-custom-field-in-metricbeat/55434 "2016-07-13T18:17:52Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![rajkumar3v](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@rajkumar3v](https://discuss.elastic.co/u/rajkumar3v)
#### Post date: [July 13, 2016, 6:17pm UTC](https://discuss.elastic.co/t/how-to-create-a-custom-field-in-metricbeat/55434/1 "2016-07-13T18:17:52Z")

</div>

Hello!!

I have two queries,

1. I want to collect total count of CPU in a server but it is not available in metricbeat. so how can I  
collect total number of cpu?

2. Along with metricbeat data I need to send some custom ID which may represent tenant\_ID or  
server\_ID. so it will hep me to analyze the data based on tenant\_ID

Thanks a lot,  
Raj

---

<div class="post-metadata">

### Author: ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)
#### Post date: [July 13, 2016, 9:58pm UTC](https://discuss.elastic.co/t/how-to-create-a-custom-field-in-metricbeat/55434/2 "2016-07-13T21:58:15Z")

</div>

1. You want the number of physical processors? You should be able to get that data from `/proc/cpuinfo`. If you wanted to customize Metricbeat to report this data we have a [developer guide](https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-developer-guide.html) that we are working on readying for the GA release.

2. You can use [`fields`](https://www.elastic.co/guide/en/beats/metricbeat/current/configuration-general.html#_fields_under_root) to add arbitrary data to every event.

---

<div class="post-metadata">

### Author: ![rajkumar3v](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@rajkumar3v](https://discuss.elastic.co/u/rajkumar3v)
#### Post date: [July 19, 2016, 2:45pm UTC](https://discuss.elastic.co/t/how-to-create-a-custom-field-in-metricbeat/55434/3 "2016-07-19T14:45:54Z")

</div>

when we will get GA release

---

<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: [July 20, 2016, 6:34am UTC](https://discuss.elastic.co/t/how-to-create-a-custom-field-in-metricbeat/55434/4 "2016-07-20T06:34:18Z")

</div>

The developer guide is already now in quite a good state to start using it, no need to wait for GA.

---

<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: [August 3, 2016, 6:17pm UTC](https://discuss.elastic.co/t/how-to-create-a-custom-field-in-metricbeat/55434/5 "2016-08-03T18:17:59Z")

</div>

This topic was automatically closed after 21 days. New replies are no longer allowed.
