# Unknown target specified: setup

**URL:** <https://discuss.elastic.co/t/unknown-target-specified-setup/160713>\
**Category:** Beats\
**Created:** [December 13, 2018, 10:26am UTC](https://discuss.elastic.co/t/unknown-target-specified-setup/160713 "2018-12-13T10:26:04Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![fillic2002](https://avatars.discourse-cdn.com/v4/letter/f/c2a13f/32.png) [@fillic2002](https://discuss.elastic.co/u/fillic2002)\
**Post date:** [December 13, 2018, 10:26am UTC](https://discuss.elastic.co/t/unknown-target-specified-setup/160713/1 "2018-12-13T10:26:05Z")

</div>

Hi There,  
I am trying to create a custom beat and getting below mentioned error while running "make setup" command. ref: [https://www.elastic.co/guide/en/beats/devguide/current/setting-up-beat.html](https://www.elastic.co/guide/en/beats/devguide/current/setting-up-beat.html)  
"Unknown target specified: setup"  
I have go language installed as well as mage installed on my system. I am not able to debug this... How to proceed further?

---

<div class="post-metadata">

**Author:** ![fillic2002](https://avatars.discourse-cdn.com/v4/letter/f/c2a13f/32.png) [@fillic2002](https://discuss.elastic.co/u/fillic2002)\
**Post date:** [December 14, 2018, 11:09am UTC](https://discuss.elastic.co/t/unknown-target-specified-setup/160713/2 "2018-12-14T11:09:06Z")

</div>

Anyone any help in here? what may be wrong or where to track?i see there is no such target as setup mentioned in document

---

<div class="post-metadata">

**Author:** ![shaunak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shaunak/32/6643_2.png) [@shaunak](https://discuss.elastic.co/u/shaunak)\
**Post date:** [December 15, 2018, 12:02am UTC](https://discuss.elastic.co/t/unknown-target-specified-setup/160713/3 "2018-12-15T00:02:18Z")

</div>

I just tried to reproduce this but couldn't. I created a new beat from scratch and `make setup` ran successfully for me.

Does your custom beat folder have a `Makefile` in it? If so, could you post it's contents here?

---

<div class="post-metadata">

**Author:** ![fillic2002](https://avatars.discourse-cdn.com/v4/letter/f/c2a13f/32.png) [@fillic2002](https://discuss.elastic.co/u/fillic2002)\
**Post date:** [December 15, 2018, 11:00am UTC](https://discuss.elastic.co/t/unknown-target-specified-setup/160713/4 "2018-12-15T11:00:35Z")

</div>

make is calling a make.bat under the installable folder. Where in this eventually calling a mage %\*  
if i pass "make setup" -\> i am not able to see any target in anyof the go file under the installed folder having "setup" as target... is this calling setup target or the makefile?

Content of makefile:

BEAT\_NAME=testbeat  
BEAT\_PATH=[github.com/gsharma/testbeat](http://github.com/gsharma/testbeat)  
BEAT\_GOPATH=(firstword (subst :, ,{GOPATH})) SYSTEM\_TESTS=false TEST\_ENVIRONMENT=false ES\_BEATS?=./vendor/github.com/elastic/beats GOPACKAGES=(shell govendor list -no-status +local)  
GOBUILD\_FLAGS=-i -ldflags "-X (BEAT\_PATH)/vendor/github.com/elastic/beats/libbeat/version.buildTime=(NOW) -X (BEAT\_PATH)/vendor/github.com/elastic/beats/libbeat/version.commit=(COMMIT\_ID)"  
MAGE\_IMPORT\_PATH=${BEAT\_PATH}/vendor/github.com/magefile/mage

# Path to the libbeat Makefile

-include $(ES\_BEATS)/libbeat/scripts/Makefile

# Initial beat setup

.PHONY: setup  
setup: copy-vendor git-init update git-add

# Copy beats into vendor directory

.PHONY: copy-vendor  
copy-vendor:  
mkdir -p vendor/github.com/elastic  
cp -R {BEAT\_GOPATH}/src/github.com/elastic/beats vendor/github.com/elastic/ rm -rf vendor/github.com/elastic/beats/.git vendor/github.com/elastic/beats/x-pack mkdir -p vendor/github.com/magefile cp -R {BEAT\_GOPATH}/src/github.com/elastic/beats/vendor/github.com/magefile/mage vendor/github.com/magefile

.PHONY: git-init  
git-init:  
git init

.PHONY: git-add  
git-add:  
git add -A  
git commit -m "Add generated testbeat files"

# Collects all dependencies and then calls update

.PHONY: collect  
collect:

---

<div class="post-metadata">

**Author:** ![fillic2002](https://avatars.discourse-cdn.com/v4/letter/f/c2a13f/32.png) [@fillic2002](https://discuss.elastic.co/u/fillic2002)\
**Post date:** [December 21, 2018, 7:25am UTC](https://discuss.elastic.co/t/unknown-target-specified-setup/160713/5 "2018-12-21T07:25:19Z")

</div>

Any update would be much appreciated. I am not able to run the mage setup file.

---

<div class="post-metadata">

**Author:** ![makefriend7](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@makefriend7](https://discuss.elastic.co/u/makefriend7)\
**Post date:** [December 28, 2018, 10:30am UTC](https://discuss.elastic.co/t/unknown-target-specified-setup/160713/6 "2018-12-28T10:30:28Z")

</div>

me too.

make setup

Unknown target specified: setup

---

<div class="post-metadata">

**Author:** ![fillic2002](https://avatars.discourse-cdn.com/v4/letter/f/c2a13f/32.png) [@fillic2002](https://discuss.elastic.co/u/fillic2002)\
**Post date:** [January 3, 2019, 11:42am UTC](https://discuss.elastic.co/t/unknown-target-specified-setup/160713/7 "2019-01-03T11:42:15Z")

</div>

> [@shaunak](#):
>
> tom beat folder have a `Makefile` in it? If so, could you post it's contents here

In the make file there is no setup  
Looks like make is only working in Unix flavored OS.It does not work on Windows system Elastic team is working on getting this addressed so we got to wait until they come back on this. or please feel free to explore Nmake to create Nmake compatible makefile

---

<div class="post-metadata">

**Author:** ![makefriend7](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@makefriend7](https://discuss.elastic.co/u/makefriend7)\
**Post date:** [January 4, 2019, 12:56am UTC](https://discuss.elastic.co/t/unknown-target-specified-setup/160713/8 "2019-01-04T00:56:16Z")

</div>

I can build and run on windows system now . Just copy the files from linux. and it's a golang project.

---

<div class="post-metadata">

**Author:** ![fillic2002](https://avatars.discourse-cdn.com/v4/letter/f/c2a13f/32.png) [@fillic2002](https://discuss.elastic.co/u/fillic2002)\
**Post date:** [January 4, 2019, 5:26am UTC](https://discuss.elastic.co/t/unknown-target-specified-setup/160713/9 "2019-01-04T05:26:26Z")

</div>

May i ask you to please update the zip for the one shipped from unix? as i am only having Windows box.

---

<div class="post-metadata">

**Author:** ![makefriend7](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@makefriend7](https://discuss.elastic.co/u/makefriend7)\
**Post date:** [January 5, 2019, 2:00am UTC](https://discuss.elastic.co/t/unknown-target-specified-setup/160713/10 "2019-01-05T02:00:40Z")

</div>

I don't know how to upload a file here.In fact, it seemed one file under the directory "include" which name is fields.go

content like below

// Licensed to Elasticsearch B.V. under one or more contributor  
// license agreements. See the NOTICE file distributed with  
// this work for additional information regarding copyright  
// ownership. Elasticsearch B.V. licenses this file to you under  
// the Apache License, Version 2.0 (the "License"); you may  
// not use this file except in compliance with the License.  
// You may obtain a copy of the License at  
//  
// [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)  
//  
// Unless required by applicable law or agreed to in writing,  
// software distributed under the License is distributed on an  
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY  
// KIND, either express or implied. See the License for the  
// specific language governing permissions and limitations  
// under the License.

// Code generated by beats/dev-tools/cmd/asset/asset.go - DO NOT EDIT.

package include

import (  
"[github.com/elastic/beats/libbeat/asset](http://github.com/elastic/beats/libbeat/asset)"  
)

func init() {  
if err := asset.SetFields("countbeat", "fields.yml", asset.BeatFieldsPri, Asset); err != nil {  
panic(err)  
}  
}

// Asset returns asset data  
func Asset() string {  
return "eJzsvftzHDdyOP67 too long to type"  
}

---

<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:** [February 2, 2019, 4:00am UTC](https://discuss.elastic.co/t/unknown-target-specified-setup/160713/11 "2019-02-02T04:00:43Z")

</div>

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