# Add field from filebeat eventhub input parameter

**URL:** <https://discuss.elastic.co/t/add-field-from-filebeat-eventhub-input-parameter/330139>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [April 17, 2023, 1:42pm UTC](https://discuss.elastic.co/t/add-field-from-filebeat-eventhub-input-parameter/330139 "2023-04-17T13:42:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paf](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paf/32/99015_2.png) [@Paf](https://discuss.elastic.co/u/Paf)\
**Post date:** [April 17, 2023, 1:42pm UTC](https://discuss.elastic.co/t/add-field-from-filebeat-eventhub-input-parameter/330139/1 "2023-04-17T13:42:31Z")

</div>

Hello,

I want to add field from filebeat eventhub input parameter.

I use this input configuration:

```auto
- type: azure-eventhub
  id: azure-eventhub-insights-activity-1
  eventhub: "activity-logs"
  consumer_group: "$Default"
  connection_string: "xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  storage_account: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxX"
  storage_account_key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxx"

- type: azure-eventhub
  id: azure-eventhub-insights-activity-2
  eventhub: "activity-logs"
  consumer_group: "$Default"
  connection_string: "xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  storage_account: "xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  storage_account_key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxx"

- type: azure-eventhub
  id: azure-eventhub-insights-activity-3
  eventhub: "activity-logs"
  consumer_group: "$Default"
  connection_string: "xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  storage_account: "xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  storage_account_key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxx"

```

And i want to add the "id" field like "azure-eventhub-insights-activity-1", "azure-eventhub-insights-activity-2" or "azure-eventhub-insights-activity-3" in my log.  
It is possible add this field easily ?

Someone help-me?

Thanks

---

<div class="post-metadata">

**Author:** ![cperzrt10](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cperzrt10/32/116152_2.png) [@cperzrt10](https://discuss.elastic.co/u/cperzrt10)\
**Post date:** [April 18, 2023, 1:46pm UTC](https://discuss.elastic.co/t/add-field-from-filebeat-eventhub-input-parameter/330139/2 "2023-04-18T13:46:14Z")

</div>

Try putting for example the parameter

```auto
fields: 
  application: 'app1'

```

Placing " **fields**" at same height of " **type**"

like

```auto
- type: azure-eventhub
  eventhub: "activity-logs"
  consumer_group: "$Default"
  connection_string: "xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  storage_account: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxX"
  storage_account_key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  fields:
    application: 'azure-eventhub-insights-activity-1'

```

---

<div class="post-metadata">

**Author:** ![Paf](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paf/32/99015_2.png) [@Paf](https://discuss.elastic.co/u/Paf)\
**Post date:** [April 18, 2023, 3:18pm UTC](https://discuss.elastic.co/t/add-field-from-filebeat-eventhub-input-parameter/330139/3 "2023-04-18T15:18:40Z")

</div>

It works, thanks for your help.

---

<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:** [May 16, 2023, 5:19pm UTC](https://discuss.elastic.co/t/add-field-from-filebeat-eventhub-input-parameter/330139/4 "2023-05-16T17:19:21Z")

</div>

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