提交 79e71334 编写于 作者: T Tao Liu

[NONE-Jira] minor modify blm_telegraf

上级 7e44f54f
...@@ -149,6 +149,7 @@ func main() { ...@@ -149,6 +149,7 @@ func main() {
} }
http.HandleFunc("/telegraf", func(w http.ResponseWriter, r *http.Request) { http.HandleFunc("/telegraf", func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusAccepted)
addr := strings.Split(r.RemoteAddr, ":") addr := strings.Split(r.RemoteAddr, ":")
idx := TAOShashID([]byte(addr[0])) idx := TAOShashID([]byte(addr[0]))
...@@ -166,7 +167,8 @@ func main() { ...@@ -166,7 +167,8 @@ func main() {
req.HostIP = addr[0] req.HostIP = addr[0]
nodeChans[idx%httpworkers] <- req nodeChans[idx%httpworkers] <- req
w.WriteHeader(http.StatusAccepted)
r.Body.Close()
}) })
http.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) { http.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusNoContent) w.WriteHeader(http.StatusNoContent)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册