Trying to get influxdb/client work

Hi golangbridge community,

I have an issue with “” that make me unable to launch go script.

I tried to get smokeping result in graphana by following this post :

So I’ve install “go1.6.linux-amd64.tar.gz” then launching the command "go get -u “” but so far i get this error :
infping.go:4:5: code in directory /usr/local/go/src/ expects import “

Is anyone can help me ?

I’ve only quickly taken a look at this and am not a veteran my self (just learning).
(Heads up: the spaces in the paths are only so the forum formats the important bits, please ignore them)

But to me it looks like you go get influxdb/influxdb/client

which Github redirects to influxdata/influxdb/client

(don’t ask me why, im not that familiar with github either) but go get happily stores it in
GOPATH/ influxdb/influxdb/client

which would then be used for import paths (in your infping.go it imports influxdb).

The problem then is that influxdb_test.go and example_test.go in the influxdb package imports influxdata because that’s what it expects since that’s the “real” URL. This import path obviously doesn’t exist (because you imported into influxdb) and the compiler gives you an error.

My suggestion would be to change the path on your machine to
GOPATH/ influxdata/influxdb/client

and change the import path in your infping.go to


And see if that works. If it does, I probably was right, if not, forget what i said :slight_smile:

Thanks a lot your suggestion seems to work ! :smile:

Hey, can you please post the exact commands you used to solve this?


It’s up than a month a I don’t remember perfectly, but I think I’ve did this :


and edit my go script :

  • ""

After this few modifications, I was able to launch my script …

Hope it’s helping you.

1 Like

It helps indeed, thanks! :slight_smile:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.