Error on create a custom metricbeat

Hello,

I'm trying create a beat based on metricbeat.

I have the following errors:

grep: ../libbeat/docs/version.asciidoc: No such file or directory

and:

cp: cannot stat 'module/*/_meta/kibana/*': No such file or directory 
vendor/github.com/elastic/beats/metricbeat/Makefile:19: recipe for target 'kibana' failed
make: [kibana] Error 1 (ignored)

This are the steps i'm doing:

root@98bbac675a7b:go get github.com/magefile/mage
root@98bbac675a7b:go get github.com/elastic/beats/metricbeat

root@98bbac675a7b:python ${GOPATH}/src/github.com/elastic/beats/script/generate.py --type=metricbeat
root@98bbac675a7b:/app/src/github.com/CCSGroupInternational# python ${GOPATH}/src/github.com/elastic/beats/script/generate.py --type=metricbeat
Beat Name [Examplebeat]: vspherebeat
Your Github Name [your-github-name]: CCSGroupInternational
Beat Path [github.com/CCSGroupInternational/vspherebeat]: 
Firstname Lastname: CCS GroupInternational

root@98bbac675a7b:/app/src/github.com/CCSGroupInternational/vspherebeat# make setup
mkdir -p vendor/github.com/elastic
cp -R /app/src/github.com/elastic/beats vendor/github.com/elastic/
ln -sf /app/src/github.com/CCSGroupInternational/vspherebeat/vendor/github.com/elastic/beats/metricbeat/scripts/generate_imports_helper.py /app/src/github.com/CCSGroupInternational/vspherebeat/vendor/github
.com/elastic/beats/script/generate_imports_helper.py
rm -rf vendor/github.com/elastic/beats/.git vendor/github.com/elastic/beats/x-pack
mkdir -p vendor/github.com/magefile
cp -R /app/src/github.com/elastic/beats/vendor/github.com/magefile/mage vendor/github.com/magefile
git init
Reinitialized existing Git repository in /app/src/github.com/CCSGroupInternational/vspherebeat/.git/
New python executable in /app/src/github.com/CCSGroupInternational/vspherebeat/build/python-env/bin/python
Installing setuptools, pip, wheel...
done.
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
ERROR: docker-compose 1.23.2 has requirement PyYAML<4,>=3.10, but you'll have pyyaml 4.2b1 which is incompatible.
Module name: performancemanager
Metricset name: virtualmachines
Module performancemanager created.
Metricset virtualmachines created.
go run ./vendor/github.com/elastic/beats/metricbeat/scripts/assets/assets.go ./vendor/github.com/elastic/beats/metricbeat/module
mkdir -p include/fields
go run  ./vendor/github.com/elastic/beats/libbeat/scripts/cmd/global_fields/main.go -es_beats_path ./vendor/github.com/elastic/beats -beat_path /app/src/github.com/CCSGroupInternational/vspherebeat | go run  ./vendor/github.com/elastic/beats/dev-tools/cmd/asset/asset.go -license ASL2 -out ./include/fields/fields.go -pkg include -priority asset.LibbeatFieldsPri ./vendor/github.com/elastic/beats/libbeat/fields.yml vspherebeat
Generated fields.yml for vspherebeat to /app/src/github.com/CCSGroupInternational/vspherebeat/-
mage FieldsDocs
2019/07/02 14:56:52 Found Elastic Beats dir at /app/src/github.com/CCSGroupInternational/vspherebeat/vendor/github.com/elastic/beats
Generated fields.yml for vspherebeat to /app/src/github.com/CCSGroupInternational/vspherebeat/build/fields/fields.all.yml
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
ERROR: docker-compose 1.23.2 has requirement PyYAML<4,>=3.10, but you'll have pyyaml 4.2b1 which is incompatible.
grep: ../libbeat/docs/version.asciidoc: No such file or directory
/app/src/github.com/CCSGroupInternational/vspherebeat/build/python-env/bin/python ./vendor/github.com/elastic/beats/script/modules_collector.py --beat vspherebeat --docs_branch=
cp: cannot stat 'module/*/_meta/kibana/*': No such file or directory
vendor/github.com/elastic/beats/metricbeat/Makefile:19: recipe for target 'kibana' failed
make: [kibana] Error 1 (ignored)

Could anyone help me?

Thanks.

Regards,
Fábio Santos

I maybe have a similar problem. I tried to start creating own beats and installed the environment as described in https://www.elastic.co/guide/en/beats/devguide/current/beats-contributing.html#setting-up-dev-environment.

But when I run the "make update" command I get the following error:
~/go/src/github.com/elastic/beats$ make update
Running virtualenv with interpreter /usr/bin/python2
New python executable in /home/martin/go/src/github.com/elastic/beats/build/python-env/bin/python2
Also creating executable in /home/martin/go/src/github.com/elastic/beats/build/python-env/bin/python
Installing setuptools, pkg_resources, pip, wheel...done.
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Generating NOTICE
Get the licenses available from ['./vendor', './metricbeat/vendor', './metricbeat/module/vsphere/vendor', './metricbeat/module/postgresql/vendor', './metricbeat/module/mysql/vendor', './metricbeat/module/kvm/vendor']
WARNING: No version information found for: github.com/go-ini/ini
WARNING: No version information found for: gopkg.in/goracle.v2/odpi
Available at /home/martin/go/src/github.com/elastic/beats/NOTICE.txt
make[1]: Verzeichnis „/home/martin/go/src/github.com/elastic/beats/libbeat“ wird betreten
Running virtualenv with interpreter /usr/bin/python2
New python executable in /home/martin/go/src/github.com/elastic/beats/libbeat/build/python-env/bin/python2
Also creating executable in /home/martin/go/src/github.com/elastic/beats/libbeat/build/python-env/bin/python
Installing setuptools, pkg_resources, pip, wheel...done.
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
ERROR: docker-compose 1.23.2 has requirement PyYAML<4,>=3.10, but you'll have pyyaml 4.2b1 which is incompatible.
Installing mage v1.8.0 from vendor dir.
bash: mage: Befehl nicht gefunden
../dev-tools/make/mage.mk:9: recipe for target 'mage' failed
make[1]: [mage] Error 127 (ignoriert)
bash: mage: Befehl nicht gefunden
scripts/Makefile:322: recipe for target 'fields' failed
make[1]: *** [fields] Error 127
make[1]: Verzeichnis „/home/martin/go/src/github.com/elastic/beats/libbeat“ wird verlassen
Makefile:72: recipe for target 'update' failed
make: *** [update] Error 1

Any ideas?

Greetings,

Martin

Hello! We have a meta issue to track all the problems we found so far regarding to custom metricbeat. Please feel free to comment here and track the work: https://github.com/elastic/beats/issues/12823

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