# Filebeat custom plugin

**URL:** <https://discuss.elastic.co/t/filebeat-custom-plugin/284222>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [September 14, 2021, 9:07pm UTC](https://discuss.elastic.co/t/filebeat-custom-plugin/284222 "2021-09-14T21:07:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jpchev](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpchev/32/47826_2.png) [@jpchev](https://discuss.elastic.co/u/jpchev)\
**Post date:** [September 14, 2021, 9:07pm UTC](https://discuss.elastic.co/t/filebeat-custom-plugin/284222/1 "2021-09-14T21:07:54Z")

</div>

hi there, I'm trying to compile myself filebeat after adding a custom http output plugin: I've followed

> **[Contributing to Beats | Beats Developer Guide \[master\] | Elastic](https://www.elastic.co/guide/en/beats/devguide/current/beats-contributing.html#setting-up-dev-environment)**

and then I've added a new folder with my pluing into  
src/github.com/elastic/beats/libbeat

now I can compile filebeat, but when it runs the new output plugin is not found (_Exiting: error initializing publisher: output type http undefined_).

The init() method of my plugin is not called.

What am I missing? Do I need to declare the new plugin somewhere?

The plugin is found if I import it in filebeat main.go, but how can I avoid that? How can I get the same behavior of standard output plugins (ex. elasticsearch)?

---

<div class="post-metadata">

**Author:** ![jpchev](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpchev/32/47826_2.png) [@jpchev](https://discuss.elastic.co/u/jpchev)\
**Post date:** [September 16, 2021, 8:23am UTC](https://discuss.elastic.co/t/filebeat-custom-plugin/284222/2 "2021-09-16T08:23:45Z")

</div>

ok, I got it, the import needs to be added in the following file

_[github.com/elastic/beats/libbeat/publisher/includes/includes.go](http://github.com/elastic/beats/libbeat/publisher/includes/includes.go)_

---

<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 14, 2021, 10:23am UTC](https://discuss.elastic.co/t/filebeat-custom-plugin/284222/3 "2021-10-14T10:23:55Z")

</div>

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