banzaicloud / aws-autoscaling-exporter

Prometheus exporter with AWS auto scaling group and instance level metrics for Hollowtrees
Apache License 2.0
14 stars 5 forks source link

instructions; mention prereqs to install #6

Open mozai opened 5 years ago

mozai commented 5 years ago

Building the project is as simple as running a go build command. The result is a statically linked executable binary. go build .

I believe you forgot to mention requirements, steps to perform before this instruction.

Steps to reproduce: $ go version go version go1.11.4 linux/amd64 $ git clone https://github.com/banzaicloud/aws-autoscaling-exporter.git $ cd aws-autoscaling-exporter/ $ go build .

Expected outcome: a new binary appears in either cwd or in ~/go/bin/

Seen:

main.go:7:2: cannot find package "github.com/banzaicloud/aws-autoscaling-exporter/exporter" in any of:
        /opt/go/src/github.com/banzaicloud/aws-autoscaling-exporter/exporter (from $GOROOT)
        /home/moses/go/src/github.com/banzaicloud/aws-autoscaling-exporter/exporter (from $GOPATH)
main.go:8:2: cannot find package "github.com/prometheus/client_golang/prometheus" in any of:
        /opt/go/src/github.com/prometheus/client_golang/prometheus (from $GOROOT)
        /home/moses/go/src/github.com/prometheus/client_golang/prometheus (from $GOPATH)
main.go:9:2: cannot find package "github.com/prometheus/client_golang/prometheus/promhttp" in any of:
        /opt/go/src/github.com/prometheus/client_golang/prometheus/promhttp (from $GOROOT)
        /home/moses/go/src/github.com/prometheus/client_golang/prometheus/promhttp (from $GOPATH)
main.go:10:2: cannot find package "github.com/sirupsen/logrus" in any of:
        /opt/go/src/github.com/sirupsen/logrus (from $GOROOT)
        /home/moses/go/src/github.com/sirupsen/logrus (from $GOPATH)

prometheus/client_golang/prometheus is probably a given, but you should at least mention that sirupsen/logrus should be installed and built first. It would help novices if you briefly described how to install and build the prereqs.

mozai commented 5 years ago

What worked instead is:

go get github.com/banzaicloud/aws-autoscaling-exporter
ls -l ~/go/bin/aws-autoscaling-exporter

Should this be in the install instructions instead ?