# Metricbeat from source builds x-pack modules but doesnt contain directories in image

**URL:** <https://discuss.elastic.co/t/metricbeat-from-source-builds-x-pack-modules-but-doesnt-contain-directories-in-image/285752>\
**Category:** Beats\
**Tags:** docker, metricbeat\
**Created:** [October 2, 2021, 7:19pm UTC](https://discuss.elastic.co/t/metricbeat-from-source-builds-x-pack-modules-but-doesnt-contain-directories-in-image/285752 "2021-10-02T19:19:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ss\_22](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@ss\_22](https://discuss.elastic.co/u/ss_22)\
**Post date:** [October 2, 2021, 7:19pm UTC](https://discuss.elastic.co/t/metricbeat-from-source-builds-x-pack-modules-but-doesnt-contain-directories-in-image/285752/1 "2021-10-02T19:19:52Z")

</div>

Hello,

I have recently built Metricbeat from source code after following the developer guides. I noticed it builds all of the x-pack modules, but at the end of the day the image doesnt contain these module directories.

Ultimately, I need to make just a few line updates to the AWS module for the normal metricbeat:7.14.0 image to work in my desired destination environment. I thought I could build this from source after making those updates to the x-pack/metricbeat/aws code.

I pulled the 7.14.0 code, updated the aws.go code, and everything built fine ... but at the end of the day, there was no module, module.d directories to configure with YAMLs.

Please Help!

---

<div class="post-metadata">

**Author:** ![Kaiyan\_Sheng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kaiyan_sheng/32/38247_2.png) [@Kaiyan\_Sheng](https://discuss.elastic.co/u/Kaiyan_Sheng)\
**Post date:** [October 8, 2021, 2:58am UTC](https://discuss.elastic.co/t/metricbeat-from-source-builds-x-pack-modules-but-doesnt-contain-directories-in-image/285752/2 "2021-10-08T02:58:54Z")

</div>

Hello! How are you building it after changing the aws code? What I usually do is under x-pack/metricbeat, I run `mage update; mage build`. Then you can run `./metricbeat modules enable aws` to enable aws module specifically for testing.

---

<div class="post-metadata">

**Author:** ![ss\_22](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@ss\_22](https://discuss.elastic.co/u/ss_22)\
**Post date:** [October 9, 2021, 3:46pm UTC](https://discuss.elastic.co/t/metricbeat-from-source-builds-x-pack-modules-but-doesnt-contain-directories-in-image/285752/3 "2021-10-09T15:46:27Z")

</div>

Yes, you are totally right!

My mistake was I was building from the beat/metricbeat directory (hence creating the OSS version). When I built from beat/x-pack/metricbeat, it was the image Metricbeat image I was expecting.

Thank you so much!

---

<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:** [November 6, 2021, 5:47pm UTC](https://discuss.elastic.co/t/metricbeat-from-source-builds-x-pack-modules-but-doesnt-contain-directories-in-image/285752/4 "2021-11-06T17:47:15Z")

</div>

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