# Exported Fields: Name

**URL:** <https://discuss.elastic.co/t/exported-fields-name/80074>\
**Category:** Beats\
**Tags:** heartbeat\
**Created:** [March 27, 2017, 6:43am UTC](https://discuss.elastic.co/t/exported-fields-name/80074 "2017-03-27T06:43:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dosera](https://avatars.discourse-cdn.com/v4/letter/d/a183cd/32.png) [@dosera](https://discuss.elastic.co/u/dosera)\
**Post date:** [March 27, 2017, 6:43am UTC](https://discuss.elastic.co/t/exported-fields-name/80074/1 "2017-03-27T06:43:32Z")

</div>

Hello,  
I noticed that the field 'name' is exported as 'type' if set.  
E.g.

```auto
- name: some-name
  type: http
  urls:
    - www.myurl.com:123

```

results in a document like

```auto
{
...
"up": true,
"type": "some-name"
...
}

```

However, if no name is set, the type would be `http`.  
I find this quite unintuitive - or is this by design?

BR

---

<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:** [March 28, 2017, 8:20am UTC](https://discuss.elastic.co/t/exported-fields-name/80074/2 "2017-03-28T08:20:27Z")

</div>

It's documented here: [https://www.elastic.co/guide/en/beats/heartbeat/current/configuration-heartbeat-options.html#monitor-name](https://www.elastic.co/guide/en/beats/heartbeat/current/configuration-heartbeat-options.html#monitor-name)

what's missing in the doc is, if `name` is not configured, the `name` setting defaults to the `type`-setting. That is `name` is optional (but should be used if multiple monitors of same time are configured).

You finding this unintuitive, how would you like it to work?

---

<div class="post-metadata">

**Author:** ![dosera](https://avatars.discourse-cdn.com/v4/letter/d/a183cd/32.png) [@dosera](https://discuss.elastic.co/u/dosera)\
**Post date:** [March 28, 2017, 8:36am UTC](https://discuss.elastic.co/t/exported-fields-name/80074/3 "2017-03-28T08:36:20Z")

</div>

Hi Steffen,

I am aware of the documentation.  
However, in my understanding it's a bit unintuitive that the `name` field overwrites the `type`.  
I would expect a field `name` in the result set.  
Furthermore, if I want to have the value of `name` and the `type`, I would have to parse the `monitor` field to extract the corresponding `type` again.

So imho:

_Configuration_

```auto
- name: myname
  type: http
  urls:
    - http://www.myurl.com:123
  ...

```

should result in

```auto
...
{
   "monitor": "$name@$type@$url",
   "name": "myname",
   "type": "http",
   ...
}

```

rather than

```auto
...
{
   "monitor": "$type@$url",
   "type": "myname",
   ...
}

```

BR

---

<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:** [March 28, 2017, 8:55am UTC](https://discuss.elastic.co/t/exported-fields-name/80074/4 "2017-03-28T08:55:57Z")

</div>

Thanks. I totally agree with your proposal. Can you open a [github issue/enhancement request](https://github.com/elastic/beats/issues) for heartbeat?

---

<div class="post-metadata">

**Author:** ![dosera](https://avatars.discourse-cdn.com/v4/letter/d/a183cd/32.png) [@dosera](https://discuss.elastic.co/u/dosera)\
**Post date:** [March 28, 2017, 9:46am UTC](https://discuss.elastic.co/t/exported-fields-name/80074/5 "2017-03-28T09:46:51Z")

</div>

Sure, will do within the next few hours.  
Thank you.

See [issue](https://github.com/elastic/beats/issues/3838)

---

<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:** [April 25, 2017, 9:46am UTC](https://discuss.elastic.co/t/exported-fields-name/80074/6 "2017-04-25T09:46:51Z")

</div>

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