# Cutom field in a metricset

**URL:** <https://discuss.elastic.co/t/cutom-field-in-a-metricset/110298>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [December 5, 2017, 9:18am UTC](https://discuss.elastic.co/t/cutom-field-in-a-metricset/110298 "2017-12-05T09:18:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![slaypl](https://avatars.discourse-cdn.com/v4/letter/s/f9ae1b/32.png) [@slaypl](https://discuss.elastic.co/u/slaypl)\
**Post date:** [December 5, 2017, 9:18am UTC](https://discuss.elastic.co/t/cutom-field-in-a-metricset/110298/1 "2017-12-05T09:18:52Z")

</div>

Hello there,

Is there a possibility to add a custom field with a static value in a metricset? The thing that I'm interested in is adding a custom field for the cpu metricset and only to that (not for other metricsets from the system module). I know that I can add a custom field in the metricbeat configuration file, but that way I'm getting that field in all documents from metricbeat. I'm using version 6.0.

My system.yml is configured with default settings.

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [December 5, 2017, 1:20pm UTC](https://discuss.elastic.co/t/cutom-field-in-a-metricset/110298/2 "2017-12-05T13:20:46Z")

</div>

One can add fields/tags and processors local to a module. You can configure the system module multiple times. That is, you can have one module configuration with CPU enabled only.

---

<div class="post-metadata">

**Author:** ![slaypl](https://avatars.discourse-cdn.com/v4/letter/s/f9ae1b/32.png) [@slaypl](https://discuss.elastic.co/u/slaypl)\
**Post date:** [December 5, 2017, 1:41pm UTC](https://discuss.elastic.co/t/cutom-field-in-a-metricset/110298/3 "2017-12-05T13:41:07Z")

</div>

Works like a charm, thanks a lot!

---

<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 2, 2018, 1:41pm UTC](https://discuss.elastic.co/t/cutom-field-in-a-metricset/110298/4 "2018-01-02T13:41:24Z")

</div>

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