# How to generate new file per metricbeat event

**URL:** <https://discuss.elastic.co/t/how-to-generate-new-file-per-metricbeat-event/301732>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [April 6, 2022, 9:44am UTC](https://discuss.elastic.co/t/how-to-generate-new-file-per-metricbeat-event/301732 "2022-04-06T09:44:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AMBUJ\_DUBEY](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ambuj_dubey/32/103980_2.png) [@AMBUJ\_DUBEY](https://discuss.elastic.co/u/AMBUJ_DUBEY)\
**Post date:** [April 6, 2022, 9:44am UTC](https://discuss.elastic.co/t/how-to-generate-new-file-per-metricbeat-event/301732/1 "2022-04-06T09:44:12Z")

</div>

How can I generate a new file for every new metricbeat event?

> **[Configure the File output | Metricbeat Reference \[8.1\] | Elastic](https://www.elastic.co/guide/en/beats/metricbeat/current/file-output.html#_number_of_files)**

Below config creates a file named metricbeat and keeps appending data into it.

output.file:  
enabled: true  
path: "/tmp/metricbeat"

---

<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 4, 2022, 11:44am UTC](https://discuss.elastic.co/t/how-to-generate-new-file-per-metricbeat-event/301732/2 "2022-05-04T11:44:16Z")

</div>

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