# EFK | Filebeat

**URL:** <https://discuss.elastic.co/t/efk-filebeat/345211>\
**Category:** Beats\
**Tags:** elastic-stack-monitoring, docker, filebeat\
**Created:** [October 17, 2023, 1:02pm UTC](https://discuss.elastic.co/t/efk-filebeat/345211 "2023-10-17T13:02:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hassan\_Ahmed](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hassan_ahmed/32/126595_2.png) [@Hassan\_Ahmed](https://discuss.elastic.co/u/Hassan_Ahmed)\
**Post date:** [October 17, 2023, 1:02pm UTC](https://discuss.elastic.co/t/efk-filebeat/345211/1 "2023-10-17T13:02:34Z")

</div>

[2023-10-16 12:43:41] | DEBUG | watch\_dir | django.utils.autoreload | Watching dir /home/hassan/Documents/PROJECTS/vault-api/venv/lib/python3.10/site-packages/oauth2\_provider/locale with glob.

I have a log file above with "|" seprated and i want to dissect and tokenize it with filebeat processors and put the value in add\_fields fields. Please correct me if i am doing wrong thanks

Example:

filebeat.inputs:

- type: log  
enabled: true  
paths:
  - /usr/share/filebeat/logs/\*.log  
multiline.pattern: '^['  
multiline.negate: true  
multiline.match: after

output.elasticsearch:  
hosts: ["elasticsearch:9200"]

processors:

- dissect:  
tokenizer: '"[%{asctime}] | %{levelname} | %{funcName} | %{name} | %{message}"'  
field: "message"  
target\_prefix: ""

- add\_fields:  
target: Project  
fields:  
Time: "%{asctime}"  
Level: "%{levelname}"  
Function: "%{funcName}"  
Name: "%{name}"  
Message: "%{message}"

---

<div class="post-metadata">

**Author:** ![suman.kumar](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@suman.kumar](https://discuss.elastic.co/u/suman.kumar)\
**Post date:** [November 1, 2023, 2:02pm UTC](https://discuss.elastic.co/t/efk-filebeat/345211/2 "2023-11-01T14:02:05Z")

</div>

Hi @Hassan_Ahmed

By default filebeat is having "message" field, so won't be able to create a new field with same name.

Could you please try below without add\_fields. Following contents will automatically add field name mentioned in {}.

- dissect:  
tokenizer: '%{asctime} | %{levelname} | %{funcName} | %{name} | %{message\_new}'  
field: "message"  
target\_prefix: ""

Thanks..!!

---

<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:** [November 29, 2023, 2:02pm UTC](https://discuss.elastic.co/t/efk-filebeat/345211/3 "2023-11-29T14:02:51Z")

</div>

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