2018-09-04 21:58:37 +00:00
|
|
|
package http
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"net/http"
|
|
|
|
)
|
|
|
|
|
2018-10-04 18:21:53 +00:00
|
|
|
// HealthHandler returns the status of the process.
|
|
|
|
func HealthHandler(w http.ResponseWriter, r *http.Request) {
|
2018-12-21 03:53:54 +00:00
|
|
|
msg := `{"name":"influxdb", "message":"ready for queries and writes", "status":"pass", "checks":[]}`
|
|
|
|
w.Header().Set("Content-Type", "application/json; charset=utf-8")
|
2018-09-04 21:58:37 +00:00
|
|
|
w.WriteHeader(http.StatusOK)
|
2018-12-21 03:53:54 +00:00
|
|
|
fmt.Fprintln(w, msg)
|
2018-09-04 21:58:37 +00:00
|
|
|
}
|