# How to define the host field going forward

**URL:** <https://discuss.elastic.co/t/how-to-define-the-host-field-going-forward/185804>\
**Category:** Logstash\
**Created:** [June 14, 2019, 8:43am UTC](https://discuss.elastic.co/t/how-to-define-the-host-field-going-forward/185804 "2019-06-14T08:43:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fhlmbrg](https://avatars.discourse-cdn.com/v4/letter/f/e480ec/32.png) [@fhlmbrg](https://discuss.elastic.co/u/fhlmbrg)\
**Post date:** [June 14, 2019, 8:43am UTC](https://discuss.elastic.co/t/how-to-define-the-host-field-going-forward/185804/1 "2019-06-14T08:43:31Z")

</div>

Hi,

Ref. the ECS schema definition of the `host` field [https://github.com/elastic/ecs/blob/master/schemas/host.yml](https://github.com/elastic/ecs/blob/master/schemas/host.yml)

When running av mix of Beats and Syslog/UDP inputs to Logstash, the host field gets defined differently. Beats insists on storing the hostname in a `host.name` object key, while Logstash insists on using the `host` field as a string.

Try mixing the two and you get the error message:

```auto
object mapping for [host] tried to parse field [host] as object, but found a concrete value

```

I'd like to conform to **one** way of defining this field, no matter which input I'm using. One format to rule them all 🙂

What is the correct way to handle the `host` field as of today and going forward? Should it be defined as an object or a string?

---

<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:** [July 12, 2019, 8:43am UTC](https://discuss.elastic.co/t/how-to-define-the-host-field-going-forward/185804/2 "2019-07-12T08:43:32Z")

</div>

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