Skip to content
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

Merged
merged 2 commits into from
Apr 6, 2020
Merged

feat(handler): Add 2.0 compatible health endpoint #17252

merged 2 commits into from
Apr 6, 2020

Conversation

bednar
Copy link
Contributor

@bednar bednar commented Mar 13, 2020

Closes #17248

Make 1.x support the 2.0 health API.

Signed-off-by: Jakub Bednar <jakub.bednar@gmail.com>
Signed-off-by: Jakub Bednar <jakub.bednar@gmail.com>
@bednar bednar marked this pull request as ready for review March 16, 2020 07:51
@gitirabassi gitirabassi removed their request for review March 16, 2020 08:29
@@ -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),
Copy link
Contributor

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.

Copy link
Contributor

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?

Copy link
Contributor Author

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:

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.

@bednar bednar requested a review from dgnorton March 20, 2020 07:00
@goller goller removed their request for review March 25, 2020 22:33
@sranka
Copy link
Contributor

sranka commented May 20, 2020

@dgnorton I cannot see the code in https://github.com/influxdata/influxdb/tree/master-1.x, there is even no /health in a full text search. Shouldn't this be already merged therein?

@sranka
Copy link
Contributor

sranka commented Jun 9, 2020

There are more commits that have not been probably merged into master-1.x yet. I will add the health endpoint together with #18391, it needs fixes. @bednar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants