# Issues generating custom Beat

**URL:** https://discuss.elastic.co/t/issues-generating-custom-beat/290111
**Category:** Beats
**Tags:** beats-development
**Created:** [November 24, 2021, 11:21pm UTC](https://discuss.elastic.co/t/issues-generating-custom-beat/290111 "2021-11-24T23:21:05Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![mbhakta](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@mbhakta](https://discuss.elastic.co/u/mbhakta)
#### Post date: [November 24, 2021, 11:21pm UTC](https://discuss.elastic.co/t/issues-generating-custom-beat/290111/1 "2021-11-24T23:21:05Z")

</div>

Hello!

I'm attempting to create a custom beat using the instructions here:  
[https://www.elastic.co/guide/en/beats/devguide/7.15/newbeat-generate.html](https://www.elastic.co/guide/en/beats/devguide/7.15/newbeat-generate.html)

and I'm having issues when running

```auto
mage GenerateCustomBeat

```

I'm running it inside the /beats directory after creating a user directory following the steps above.  
Running the command with -debug gives me:

```auto
DEBUG: 14:07:56.730285 getting all non-mage files in .
DEBUG: 14:07:56.746765 found non-mage files
DEBUG: 14:07:56.746866 getting all files plus mage files
DEBUG: 14:07:57.241040 time to scan for Magefiles: 510.7821ms
DEBUG: 14:07:57.241358 found magefiles: magefile.go
DEBUG: 14:07:57.249455 output exe is /root/.magefile/cf01ab46648402f71bd2808a2182c365f10729f5
DEBUG: 14:07:57.256224 go build cache exists, will ignore any compiled binary
DEBUG: 14:07:57.256315 parsing files
DEBUG: 14:07:57.257231 found target AddLicenseHeaders
DEBUG: 14:07:57.257317 found target CheckLicenseHeaders
DEBUG: 14:07:57.257614 found target DumpVariables
DEBUG: 14:07:57.257987 found target Fmt
DEBUG: 14:07:57.258322 found target PackageBeatDashboards
DEBUG: 14:07:57.258626 time parse Magefiles: 1.9685ms
DEBUG: 14:07:57.258986 Creating mainfile at mage_output_file.go
DEBUG: 14:07:57.259682 writing new file at mage_output_file.go
DEBUG: 14:07:57.261213 compiling to /root/.magefile/cf01ab46648402f71bd2808a2182c365f10729f5
DEBUG: 14:07:57.261287 compiling using gocmd: go
DEBUG: 14:07:57.351629 running go build -o /root/.magefile/cf01ab46648402f71bd2808a2182c365f10729f5 magefile.go mage_output_file.go
DEBUG: 14:07:59.279420 time to compile Magefile: 1.9270298s
DEBUG: 14:07:59.279988 running binary /root/.magefile/cf01ab46648402f71bd2808a2182c365f10729f5
DEBUG: 14:07:59.280109 running magefile with mage vars:
MAGEFILE_DEBUG=1
MAGEFILE_GOCMD=go
Unknown target specified: "GenerateCustomBeat"

```

And it looks like GenerateCustomBeat does not exist or can't be found. Is there something else I need to do?

---

<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: [December 23, 2021, 1:21am UTC](https://discuss.elastic.co/t/issues-generating-custom-beat/290111/2 "2021-12-23T01:21:16Z")

</div>

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