# Filebeat custom module to subscribe to events?

**URL:** <https://discuss.elastic.co/t/filebeat-custom-module-to-subscribe-to-events/199918>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [September 18, 2019, 6:47am UTC](https://discuss.elastic.co/t/filebeat-custom-module-to-subscribe-to-events/199918 "2019-09-18T06:47:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![granier](https://avatars.discourse-cdn.com/v4/letter/g/b3f665/32.png) [@granier](https://discuss.elastic.co/u/granier)\
**Post date:** [September 18, 2019, 6:47am UTC](https://discuss.elastic.co/t/filebeat-custom-module-to-subscribe-to-events/199918/1 "2019-09-18T06:47:39Z")

</div>

Hi,

Is it possible to develop a custom filebeat module that subscribe to event such as clear\_renamed or clean\_removed or clean\_inactive ?

My goal is to develop a module that delete the log files when filebeat stops to process them.

Sincerly,

B. Granier  
Elasticsearch certified

---

<div class="post-metadata">

**Author:** ![pmercado](https://avatars.discourse-cdn.com/v4/letter/p/59ef9b/32.png) [@pmercado](https://discuss.elastic.co/u/pmercado)\
**Post date:** [September 18, 2019, 7:39am UTC](https://discuss.elastic.co/t/filebeat-custom-module-to-subscribe-to-events/199918/2 "2019-09-18T07:39:20Z")

</div>

Hi @granier,

Although managing lifecycle of log files is not the responsibility of Filebeat I can see the value in reacting to some events.

That is not possible with a module only, some logic at the harvester needs to trigger an event. Can you please open an [Enhancement Request](https://github.com/elastic/beats/issues/new/choose) explaining the scenario so the team can consider it?

Thanks

---

<div class="post-metadata">

**Author:** ![granier](https://avatars.discourse-cdn.com/v4/letter/g/b3f665/32.png) [@granier](https://discuss.elastic.co/u/granier)\
**Post date:** [September 18, 2019, 11:07am UTC](https://discuss.elastic.co/t/filebeat-custom-module-to-subscribe-to-events/199918/3 "2019-09-18T11:07:06Z")

</div>

Hi Pablo,

A great thanks for the way you accept my question. I open an enhancement request.

---

<div class="post-metadata">

**Author:** ![granier](https://avatars.discourse-cdn.com/v4/letter/g/b3f665/32.png) [@granier](https://discuss.elastic.co/u/granier)\
**Post date:** [September 18, 2019, 11:17am UTC](https://discuss.elastic.co/t/filebeat-custom-module-to-subscribe-to-events/199918/4 "2019-09-18T11:17:25Z")

</div>

> [@granier](#):
>
> as clear\_renamed or clean\_removed or clean\_inactive

Hi Pablo,

This is done : allow to develop module to subscribe to filebeat events. #13725

---

<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:** [October 16, 2019, 11:17am UTC](https://discuss.elastic.co/t/filebeat-custom-module-to-subscribe-to-events/199918/5 "2019-10-16T11:17:29Z")

</div>

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