# Log only file metadata not content

**URL:** <https://discuss.elastic.co/t/log-only-file-metadata-not-content/144173>\
**Category:** Logstash\
**Created:** [August 13, 2018, 12:55pm UTC](https://discuss.elastic.co/t/log-only-file-metadata-not-content/144173 "2018-08-13T12:55:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sujeetKumar](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sujeetKumar](https://discuss.elastic.co/u/sujeetKumar)\
**Post date:** [August 13, 2018, 12:55pm UTC](https://discuss.elastic.co/t/log-only-file-metadata-not-content/144173/1 "2018-08-13T12:55:23Z")

</div>

Our requirement is just to get file metadata (file names, createdDate, lastmodified etc) from a path.

We have a directory where all the stdout and stderr files are being stored for different jobs. We just want to log those file details in one elasticsearch index. We don't want to write message (file content), as we are already writing it into different index.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [August 13, 2018, 1:19pm UTC](https://discuss.elastic.co/t/log-only-file-metadata-not-content/144173/2 "2018-08-13T13:19:29Z")

</div>

Periodically run `ls -l` via an exec input?

---

<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:** [September 10, 2018, 1:19pm UTC](https://discuss.elastic.co/t/log-only-file-metadata-not-content/144173/3 "2018-09-10T13:19:33Z")

</div>

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