influxdata / influxdb-relay

Service to replicate InfluxDB data for high availability
MIT License
855 stars 350 forks source link

installation of influxdb relay and dockerizing it #33

Closed sagarmah closed 8 years ago

sagarmah commented 8 years ago

Hello, Thanks for the update of the readme.md. I am still having issues, When I run

$ go get -u github.com/influxdata/influxdb-relay
Error:
package github.com/influxdata/influxdb-relay: directory "/usr/local/go/src/github.com/influxdata/influxdb-relay" is not using a known version control system

So I removed the directory influxdb-relay and tried again and got,

package github.com/influxdata/influxdb-relay: cannot download, $GOPATH not set. For more details see: go help gopath

I have the right gopath as we can see in the ~/.profile

if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi

if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
export PATH=$PATH:/usr/local/go/bin

still gives gopath not set error. Can you please help me out, also is there a reliable ready image on dockerhub for the influxdb-relay? Thanks and regards

rossmcdonald commented 8 years ago

@sagarmah GOPATH needs to be it's own variable, it does not mean add the go/bin directory to your PATH. If you are unfamiliar with how to build Go applications, I would recommend using the instructions in the readme here, which leverage Docker for managing the Go dependencies.

cristhianbicca commented 8 years ago

@rossmcdonald Hello

I'm using influxdb_relay to make of writing HA. The conf my relay is very simple:

[[Http]] name = "example-http" bind-addr = "0.0.0.0:9096" output = [      {Name = "local1" location = "http://172.17.0.2:8086"}, ]

so when I try to send the recording to the relay address on port 9096 I get the following error:

"Invalid write endpoint"

Can anybody help me?

tks

rossmcdonald commented 8 years ago

@cristhianbicca Please re-review the sample configuration here and modify your configuration's capitalization (Http needs to be http, Name needs to be name) and punctuation ("local1" location needs to be "local1", location).

cristhianbicca commented 8 years ago

sorry @rossmcdonald ,

It is that way anyway and the error

[[http]] name = "example-http" bind-addr = "0.0.0.0:9096" output = [ {name="local1", location="http://172.17.0.2:8086"}, ]

rossmcdonald commented 8 years ago

@cristhianbicca Try removing the , at the end of {name="local1", location="http://172.17.0.2:8086"},. The configuration needs to match the TOML spec.

cristhianbicca commented 8 years ago

@rossmcdonald

Still the question of {"Error": "invalid write endpoint"}

That at what I'm looking at is appearing 404. The relay error not to startar, up normally.

root @ f44e2103fc44: / go # $ GOPATH / bin / influxdb-relay -config relay.toml 06.24.2016 17:55:26 starting relays ... 24.06.2016 17:55:26 Starting relay HTTP "example-http" on 0.0.0.0:9096

grvr commented 8 years ago

@cristhianbicca Did you ever get around the 404 error for the HTTP relay? I'm having the same issue.

stevenviola commented 7 years ago

Not sure if you've figure out the problem, but I wasn't appending /write to the location fields, and was also getting 404 errors. In the snippet @cristhianbicca posted, it should look like this:

[[http]]
name = "example-http"
bind-addr = "0.0.0.0:9096"
output = [
  {name="local1", location="http://172.17.0.2:8086/write"},
]