Installing Sensu Go with the MIT license from source (https://github.com/sensu/sensu-go) has proved challenging. Following the directions presented in the readme.md does not let me install the service and instead I get a tremendous amount of go pathing issues.
ubuntu@ip-10-4-1-129:~/go/src/github.com/sensu/sensu-go$ pwd
/home/ubuntu/go/src/github.com/sensu/sensu-go
ubuntu@ip-10-4-1-129:~/go/src/github.com/sensu/sensu-go$ echo GOPATH
/home/ubuntu/go
ubuntu@ip-10-4-1-129:~/go/src/github.com/sensu/sensu-go echo GOROOT
/home/ubuntu/go
ubuntu@ip-10-4-1-129:~/go/src/github.com/sensu/sensu-go ls
CHANGELOG.md DCO README.md asset build.ps1 cmd docker-compose.yaml go.sum js rpc testing types
CODE_OF_CONDUCT.md FAQ.md agent backend build.sh command docker-scripts graphql licenses scripts token util
CONTRIBUTING.md LICENSE api bonsai cli dashboard go.mod handler process system transport version
ubuntu@ip-10-4-1-129:~/go/src/github.com/sensu/sensu-go$ ls cmd
loadit sensu-agent sensu-backend sensuctl
ubuntu@ip-10-4-1-129:~/go/src/github.com/sensu/sensu-go$ ls cmd/sensu-backend/
LICENSE main.go
ubuntu@ip-10-4-1-129:~/go/src/github.com/sensu/sensu-go$ go run ./cmd/sensu-backend
warning: GOPATH set to GOROOT (/home/ubuntu/go) has no effect
go run: no go files listed
As seen above my Go path is set to “/home/ubuntu/go”, but it doesn’t seem to recognize “sensu-go/cmd/sensu-backend/main.go” is a Go file.
When I try to build directly (not using the “run” command) I get the following pathing issues:
There seems to be an ongoing issue with this regarding Go and Sensu-Go: