Add field from filebeat eventhub input parameter

Hello,

I want to add field from filebeat eventhub input parameter.

I use this input configuration:

- 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

Try putting for example the parameter

fields: 
  application: 'app1'

Placing "fields" at same height of "type"

like

- 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'

It works, thanks for your help.

1 Like

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