diff --git a/relay/http.go b/relay/http.go index f0a5e9e..73d4f23 100644 --- a/relay/http.go +++ b/relay/http.go @@ -112,6 +112,13 @@ func (h *HTTP) Stop() error { func (h *HTTP) ServeHTTP(w http.ResponseWriter, r *http.Request) { start := time.Now() + + if r.URL.Path == "/ping" && (r.Method == "GET" || r.Method == "HEAD") { + w.Header().Add("X-InfluxDB-Version", "relay") + w.WriteHeader(http.StatusNoContent) + return + } + if r.URL.Path != "/write" { jsonError(w, http.StatusNotFound, "invalid write endpoint") return