Skip to content
This repository has been archived by the owner on May 24, 2023. It is now read-only.

Cannot find package "http://github.com/prometheus/common/log" #31

Open
dehatanes opened this issue Jun 9, 2021 · 3 comments
Open

Cannot find package "http://github.com/prometheus/common/log" #31

dehatanes opened this issue Jun 9, 2021 · 3 comments

Comments

@dehatanes
Copy link

Problem

When I run the following command:

go get -u github.com/sequra/logstash_exporter
cd $GOPATH/src/github.com/sequra/logstash_exporter && make

It fails with the error:

package http://github.com/prometheus/common/log: 
  cannot find package "http://github.com/prometheus/common/log" in any of:
    /usr/local/go/src/github.com/prometheus/common/log (from $GOROOT)
    /go/src/github.com/prometheus/common/log (from $GOPATH)

Can you help me to fix it?

👉 Maybe it is related with this PR on prometheus common that removes a deprecated log package.

@m-gnaedig
Copy link

Hi

I have the same Issue. Can you try to fix it?
Or can you provide me a working binary?

Thanks in advance
Manfred

@dehatanes
Copy link
Author

Hey @m-gnaedig

I could not fix it with the command that I was using. To make it work I started to use this docker image that is stable https://hub.docker.com/r/sequra/logstash_exporter
It was an easy change for me, once I was already using docker in my project. If you can use docker, I suggest you to use it instead of manually installing the lib.

Here are the changes in my Dockerfile (if useful):

  • the previous one
FROM golang:1.13

RUN go get -u github.com/sequra/logstash_exporter || exit 1 && \
    cd "${GOPATH}/src/github.com/sequra/logstash_exporter" && make || exit 1

CMD logstash_exporter --logstash.endpoint="http://...."
  • fixed one ⭐ :
FROM sequra/logstash_exporter:7.3.0.0

CMD ["--logstash.endpoint=http://...."]

@m-gnaedig
Copy link

Hi Atanes

Thanks for your detailed message.
I will do some tests with the Docker container.

Have a nice day
Manfred

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants