influxdb-relay icon indicating copy to clipboard operation
influxdb-relay copied to clipboard

Feature/ping response code

Open kinok opened this issue 8 years ago • 5 comments

Hey guys,

We had a problem regarding the hardcoded 204 No Content of /ping response code. Indeed, Google Cloud Plateform http health-checks only accept 200 OK. With this PR, you'll be able to control what response code of /ping you want/need to have, from the config file, using default-ping-response.

Thank you guys for this great tool!

kinok avatar Nov 15 '16 17:11 kinok

Hey @joelegasse, thanks for your relevant review. I agree with all your remarks, just made the changes.

kinok avatar Nov 16 '16 09:11 kinok

Hey there, Any chance to have a review of this PR? Thank you guys

kinok avatar Mar 08 '17 17:03 kinok

Also Amazon ELB requires 200 and does not work with 204.

roman-vynar avatar Sep 07 '17 11:09 roman-vynar

Getting an error with this PR:

goroutine 1 [running]:
github.com/influxdata/influxdb-relay/relay.NewHTTP(0xc420016761, 0xb, 0xc420014e21, 0xe, 0xc4200167e5, 0x0, 0x0, 0x0, 0xc8, 0xc42009c2c0, ...)
	/go/src/github.com/influxdata/influxdb-relay/relay/http.go:61 +0xdf
github.com/influxdata/influxdb-relay/relay.New(0xc4200561e0, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/go/src/github.com/influxdata/influxdb-relay/relay/relay.go:18 +0x15b
main.main()
	/go/src/github.com/influxdata/influxdb-relay/main.go:31 +0x1a1
panic: assignment to entry in nil map

Fix:

-       h := new(HTTP)
-
-       h.addr = cfg.Addr
-       h.name = cfg.Name
+       h := &HTTP{
+               addr:                cfg.Addr,
+               name:                cfg.Name,
+               pingResponseHeaders: map[string]string{},
+       }

roman-vynar avatar Sep 07 '17 11:09 roman-vynar

Soooo...this is still an issue. Google gcp still only accepts 200 response codes. This has been open since 2016 and never fixed? It has been adjusted in both influxdb and telegraf. See this issue: https://github.com/influxdata/telegraf/pull/5704/files

PatrickSplice avatar Oct 26 '20 17:10 PatrickSplice