Hi,
Setup:
GOROOT and GOPATH set
go get -v github.com/elastic/beats (installs to ${GOPATH}/src/github.com/elastic/beats)
clone this project to ${GOPATH}/github.com/hartfordfive/cloudflarebeat
Run make setup
Fails with:
$ make setup
mkdir -p vendor/github.com/elastic/
cp -R /Users/az/go/src/github.com/elastic/beats vendor/github.com/elastic/
rm -rf vendor/github.com/elastic/beats/.git
make update
make[1]: *** No rule to make target `collect', needed by `update'. Stop.
make: *** [setup] Error 2
This could be related to elastic/beats#2997
After adding an empty target....
# Collects all dependencies and then calls update
# A collect target is required by libbeat
.PHONY: collect
collect:
...we have the follwing error:
$ make setup
mkdir -p vendor/github.com/elastic/
cp -R /Users/az/go/src/github.com/elastic/beats vendor/github.com/elastic/
rm -rf vendor/github.com/elastic/beats/.git
make update
Updating generated files for libbeat
cat: _meta/beat.yml: No such file or directory
cat: _meta/beat.yml: No such file or directory
cp: cannot stat '_meta/fields.yml': No such file or directory
make[1]: *** [update] Error 1
make: *** [setup] Error 2
So we extended the Makefile collect target:
# Collects all dependencies and then calls update
# A collect target is required by libbeat
.PHONY: collect
collect:
@mkdir -p _meta
@cp etc/fields.yml _meta/fields.yml
Now make setup runs through.
After that, make fails with
$ make
go build -i
main.go:8:2: cannot find package "github.com/hartfordfive/cloudflarebeat/beater" in any of:
/opt/local/lib/go/src/github.com/hartfordfive/cloudflarebeat/beater (from $GOROOT)
/Users/az/go/src/github.com/hartfordfive/cloudflarebeat/beater (from $GOPATH)
When I symlink ${GOPATH}/github.com/hartfordfive/cloudflarebeat} (the current working dir) to ${GOPATH}/src/github.com/hartfordfive, the errors continue:
$ make
go build -i
../../../src/github.com/hartfordfive/cloudflarebeat/cloudflare/statefile.go:14:2: cannot find package "github.com/aws/aws-sdk-go/aws" in any of:
/Users/az/go/src/github.com/hartfordfive/cloudflarebeat/vendor/github.com/aws/aws-sdk-go/aws (vendor tree)
/opt/local/lib/go/src/github.com/aws/aws-sdk-go/aws (from $GOROOT)
/Users/az/go/src/github.com/aws/aws-sdk-go/aws (from $GOPATH)
../../../src/github.com/hartfordfive/cloudflarebeat/cloudflare/statefile.go:15:2: cannot find package "github.com/aws/aws-sdk-go/aws/credentials" in any of:
/Users/az/go/src/github.com/hartfordfive/cloudflarebeat/vendor/github.com/aws/aws-sdk-go/aws/credentials (vendor tree)
/opt/local/lib/go/src/github.com/aws/aws-sdk-go/aws/credentials (from $GOROOT)
/Users/az/go/src/github.com/aws/aws-sdk-go/aws/credentials (from $GOPATH)
../../../src/github.com/hartfordfive/cloudflarebeat/cloudflare/statefile.go:16:2: cannot find package "github.com/aws/aws-sdk-go/aws/session" in any of:
/Users/az/go/src/github.com/hartfordfive/cloudflarebeat/vendor/github.com/aws/aws-sdk-go/aws/session (vendor tree)
/opt/local/lib/go/src/github.com/aws/aws-sdk-go/aws/session (from $GOROOT)
/Users/az/go/src/github.com/aws/aws-sdk-go/aws/session (from $GOPATH)
../../../src/github.com/hartfordfive/cloudflarebeat/cloudflare/statefile.go:17:2: cannot find package "github.com/aws/aws-sdk-go/service/s3" in any of:
/Users/az/go/src/github.com/hartfordfive/cloudflarebeat/vendor/github.com/aws/aws-sdk-go/service/s3 (vendor tree)
/opt/local/lib/go/src/github.com/aws/aws-sdk-go/service/s3 (from $GOROOT)
/Users/az/go/src/github.com/aws/aws-sdk-go/service/s3 (from $GOPATH)
../../../src/github.com/hartfordfive/cloudflarebeat/cloudflare/client.go:10:2: cannot find package "github.com/franela/goreq" in any of:
/Users/az/go/src/github.com/hartfordfive/cloudflarebeat/vendor/github.com/franela/goreq (vendor tree)
/opt/local/lib/go/src/github.com/franela/goreq (from $GOROOT)
/Users/az/go/src/github.com/franela/goreq (from $GOPATH)
import cycle not allowed
package .
imports github.com/hartfordfive/cloudflarebeat/beater
imports github.com/elastic/beats/libbeat/publisher
imports github.com/elastic/beats/libbeat/outputs
imports github.com/elastic/beats/libbeat/publisher
../../../src/github.com/hartfordfive/cloudflarebeat/cloudflare/logconsumer.go:14:2: cannot find package "github.com/pquerna/ffjson/ffjson" in any of:
/Users/az/go/src/github.com/hartfordfive/cloudflarebeat/vendor/github.com/pquerna/ffjson/ffjson (vendor tree)
/opt/local/lib/go/src/github.com/pquerna/ffjson/ffjson (from $GOROOT)
/Users/az/go/src/github.com/pquerna/ffjson/ffjson (from $GOPATH)
make: *** [libbeat] Error 1
After...
go get github.com/aws/aws-sdk-go
go get github.com/franela/goreq
go get github.com/franela/goreq
... we are stuck at
$ make
go build -i
import cycle not allowed
package .
imports github.com/hartfordfive/cloudflarebeat/beater
imports github.com/elastic/beats/libbeat/publisher
imports github.com/elastic/beats/libbeat/outputs
imports github.com/elastic/beats/libbeat/publisher
make: *** [libbeat] Error 1
At this point, I give up. I'm no expert in go or beats in particular, so please excuse if this question was already posted (solved?) somewhere else.
To sum it up: does cloudflarebeat work with current versions of beats?
Hi,
Setup:
GOROOT and GOPATH set
go get -v github.com/elastic/beats(installs to${GOPATH}/src/github.com/elastic/beats)clone this project to
${GOPATH}/github.com/hartfordfive/cloudflarebeatRun
make setupFails with:
This could be related to elastic/beats#2997
After adding an empty target....
...we have the follwing error:
So we extended the Makefile collect target:
Now
make setupruns through.After that,
makefails withWhen I symlink
${GOPATH}/github.com/hartfordfive/cloudflarebeat}(the current working dir) to${GOPATH}/src/github.com/hartfordfive, the errors continue:After...
... we are stuck at
At this point, I give up. I'm no expert in go or beats in particular, so please excuse if this question was already posted (solved?) somewhere else.
To sum it up: does cloudflarebeat work with current versions of beats?