-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(handler): Add 2.0 compatible health endpoint #17252
Conversation
Signed-off-by: Jakub Bednar <jakub.bednar@gmail.com>
Signed-off-by: Jakub Bednar <jakub.bednar@gmail.com>
@@ -218,6 +218,10 @@ func NewHandler(c Config) *Handler { | |||
"status-head", | |||
"HEAD", "/status", false, true, authWrapper(h.serveStatus), | |||
}, | |||
Route{ // Ping | |||
"ping", | |||
"GET", "/health", false, true, authWrapper(h.serveHealth), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this under /api/v2/health
in 2.0? If so, should it be the same here? E.g., we added /api/v2/write
for 1.8.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://v2.docs.influxdata.com/v2.0/api/#tag/Health
I believe the feedback is that we need a /health API in order for the 2.0 clients to successfully perform writes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The /health
endpoint is mapped to root path in 2.0. See:
Line 22 in c8aabaf
HealthPath = "/health" |
We need this because a lot of users uses /ping
and /health
endpoint to check if is InfluxDB running... and after success they start writing or querying.
@dgnorton I cannot see the code in https://github.com/influxdata/influxdb/tree/master-1.x, there is even no |
Closes #17248
Make 1.x support the 2.0 health API.