Hi,
I know the same problem has been reported before but what I do is exactly what apparently solved the problem for the other developer.
I am trying to create a beat based on metricbeat and I am following the recipe described in the Beats Developer Guide.
I am using Python 2.7.12 with virtualenv 15.1.0
The problem is that during make setup, i gets a Python error when interpreting File "./vendor/github.com/elastic/beats/metricbeat/scripts/create_metricset.py", line 105
NameError: name 'raw_input' is not defined
This indicates that for whatever strange reason it is running Python 3 instead of Python 2.7.
Here is the whole recipe that I followed:
ubuntu@beats:~$ virtualenv -p python2.7 ~/workspace/python
ubuntu@beats:~$ source ~/workspace/python2.7/bin/activate
Running virtualenv with interpreter /usr/bin/python2.7
New python executable in /home/ubuntu/workspace/python/bin/python2.7
Also creating executable in /home/ubuntu/workspace/python/bin/python
Installing setuptools, pip, wheel...done.
ubuntu@beats:~$ source ~/workspace/python2.7/bin/activate
(python2.7) ubuntu@beats:~/workspace/SecOpsTools/IBMDataPowerXMLGW/metricbeat$ go get github.com/elastic/beats/metricbeat
(python2.7) ubuntu@beats:~/workspace/SecOpsTools/IBMDataPowerXMLGW/metricbeat$ cd src/github.com/
(python2.7) ubuntu@beats:~/workspace/SecOpsTools/IBMDataPowerXMLGW/metricbeat/src/github.com$ mkdir sops
(python2.7) ubuntu@beats:~/workspace/SecOpsTools/IBMDataPowerXMLGW/metricbeat/src/github.com$ cd sops
(python2.7) ubuntu@beats:~/workspace/SecOpsTools/IBMDataPowerXMLGW/metricbeat/src/github.com$ cd sops
(python2.7) ubuntu@beats:~/workspace/SecOpsTools/IBMDataPowerXMLGW/metricbeat/src/github.com/sops$ python ${GOPATH}/src/github.com/elastic/beats/script/generate.py --type=metricbeat
Beat Name [Examplebeat]: dpwr
Your Github Name [your-github-name]: sops
Beat Path [github.com/sops/dpwr]:
Firstname Lastname: Bob Marley
(python2.7) ubuntu@beats:~/workspace/SecOpsTools/IBMDataPowerXMLGW/metricbeat/src/github.com/sops/dpwr$ make setup
mkdir -p vendor/github.com/elastic/
cp -R /home/ubuntu/workspace/SecOpsTools/IBMDataPowerXMLGW/metricbeat/src/github.com/elastic/beats vendor/github.com/elastic/
rm -rf vendor/github.com/elastic/beats/.git
make create-metricset
make[1]: Entering directory '/home/ubuntu/workspace/SecOpsTools/IBMDataPowerXMLGW/metricbeat/src/github.com/sops/dpwr'
Traceback (most recent call last):
File "./vendor/github.com/elastic/beats/metricbeat/scripts/create_metricset.py", line 105, in
args.module = raw_input("Module name: ")
NameError: name 'raw_input' is not defined
vendor/github.com/elastic/beats/metricbeat/Makefile:78: recipe for target 'create-metricset' failed
make[1]: *** [create-metricset] Error 1
make[1]: Leaving directory '/home/ubuntu/workspace/SecOpsTools/IBMDataPowerXMLGW/metricbeat/src/github.com/sops/dpwr'
Makefile:17: recipe for target 'setup' failed
make: *** [setup] Error 2
I tried different ways, even correcting the faulty python source file, it seems to be overwritten therefore absolutely nothing works.
Thanks