# How do I extract partial fields from log.file.path

**URL:** <https://discuss.elastic.co/t/how-do-i-extract-partial-fields-from-log-file-path/309854>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [July 18, 2022, 7:36am UTC](https://discuss.elastic.co/t/how-do-i-extract-partial-fields-from-log-file-path/309854 "2022-07-18T07:36:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![regyhuang](https://avatars.discourse-cdn.com/v4/letter/r/977dab/32.png) [@regyhuang](https://discuss.elastic.co/u/regyhuang)\
**Post date:** [July 18, 2022, 7:36am UTC](https://discuss.elastic.co/t/how-do-i-extract-partial-fields-from-log-file-path/309854/1 "2022-07-18T07:36:11Z")

</div>

for example  
log.file.path:/data/logs/service-name/service-name.log  
I want to extract the service-name of log.file.path as a tags ,How to configure filebeat.yml

---

<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:** [August 15, 2022, 9:37am UTC](https://discuss.elastic.co/t/how-do-i-extract-partial-fields-from-log-file-path/309854/2 "2022-08-15T09:37:00Z")

</div>

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