-
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
fix(api/health): report version #18173
Conversation
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.
Awesome!
Personally, I wouldn't mind seeing the commit in there too. |
d60b86a
to
2e4b537
Compare
http/health.go
Outdated
) | ||
|
||
// HealthHandler returns the status of the process. | ||
func HealthHandler(w http.ResponseWriter, r *http.Request) { | ||
msg := `{"name":"influxdb", "message":"ready for queries and writes", "status":"pass", "checks":[]}` | ||
msg := fmt.Sprintf(`{"name":"influxdb", "message":"ready for queries and writes", "status":"pass", "checks":[], "version": %q}`, platform.GetBuildInfo().Version) |
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 more i think about it, the more valuable i feel like commit
would be in here. (platform.GetBuildInfo().Commit
) 🤷♂️
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.
A new "commit" field? I can add it as well herein.
85912c0
to
c35c90a
Compare
Closes #13907
InfluxDB 1.8 "/health" endpoint already returns version,
This PR also adds version to 2.0 "/health" endpoint