# Step 3 - Init and create the metricset failure

**URL:** <https://discuss.elastic.co/t/step-3-init-and-create-the-metricset-failure/112046>\
**Category:** Beats\
**Tags:** beats-development\
**Created:** [December 15, 2017, 9:05pm UTC](https://discuss.elastic.co/t/step-3-init-and-create-the-metricset-failure/112046 "2017-12-15T21:05:07Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![rvigeant](https://avatars.discourse-cdn.com/v4/letter/r/f0a364/32.png) [@rvigeant](https://discuss.elastic.co/u/rvigeant)\
**Post date:** [January 10, 2018, 4:10pm UTC](https://discuss.elastic.co/t/step-3-init-and-create-the-metricset-failure/112046/11 "2018-01-10T16:10:52Z")

</div>

@pierhugues @ruflin I was finally able to create my module and metricset by modifying the procedure and a makefile,

Following is the revised recipe that works.  
All changes that I had to do are indicated with \*\*\* in my comments.

```
export GOPATH=~/workspace/metricbeat 

# *** 1) Must issue this export variable to fix the mix useage of python 2.7 and python 3 during "make setup"
export VIRTUALENV_PARAMS="-p python2.7" 

mkdir ~/workspace
cd ~/workspace
rm -rf metricbeat

go get github.com/elastic/beats/metricbeat
python ${GOPATH}/src/github.com/elastic/beats/script/generate.py --type=metricbeat
    Questions:
        Beat Name [Examplebeat]: metricbeat_
        Your Github Name [your-github-name]: my-github-name
        Beat Path [github.com/my-github-name/metricbeat]: github.com/my-githubname/beats/metricbeat
        Firstname Lastname: Abc Def_

cd metricbeat/src/github.com/my-github-name/beats/metricbeat/ 

# *** 2) Must do manually the following command to fix the first fatal erreor - "ImportError: No module named generate_imports_helper"
cp -r $GOPATH/src/github.com/elastic/beats/metricbeat/scripts . # Important to fix problem 1
  
  
# *** 3) Edit the the following file: 
    nano ${GOPATH}/src/github.com/elastic/beats/metricbeat/Makefile_
# *** Replace the following line in target section "kibana:"
    @-cp -r module/*/_meta/kibana _meta/
# ***with this line:
    @-cp -r ../../../elastic/beats/metricbeat/module/*/_meta/kibana _meta/

   

# Create the the module and first metricset
make setup
Module name: datapower
Metricset name: status

# Or create new metricset to_
When creating new metricsets:
    make create-metricset
    make update
    make collect
```

---

_[View the full topic](https://discuss.elastic.co/t/step-3-init-and-create-the-metricset-failure/112046)._
