-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[ADDED] Logs to healthcheck handler #2976
Conversation
server/monitor.go
Outdated
@@ -2768,6 +2768,7 @@ func (s *Server) HandleHealthz(w http.ResponseWriter, r *http.Request) { | |||
|
|||
hs := s.healthz() | |||
if hs.Error != _EMPTY_ { | |||
s.Errorf("Healthcheck failed: %q", hs.Error) |
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.
Might suggest this be a Warnf since it can and should clear.
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.
👍
Kubernetes probes don't use nor log the reponse body of health endpoints. This means that for some reason a nats node running in Kubernetes becomes on a Not Ready state we won't have a way to know why other than to manually access the cluster and call the /healthz endpoint manually and see the error. This change adds an error log so we can observe what is going wrong with a nats node that is not ready. Signed-off-by: Samuel Torres <samuel.torres@form3.tech>
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.
In general LGTM, but want Ivan to weigh in as well.
Agree that it would be helpful - looks like Kubelet may log the response body with |
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.
LGTM. No objection to this change.
Kubernetes probes don't use nor log the reponse body of health
endpoints. This means that for some reason a nats node running in
Kubernetes becomes on a Not Ready state we won't have a way to know why
other than to manually access the cluster and call the /healthz endpoint
manually and see the error.
This change adds an error log so we can observe what is going wrong with
a nats node that is not ready.
Signed-off-by: Samuel Torres samuel.torres@form3.tech
Resolves #NNN
git pull --rebase origin main
)Resolves #
Changes proposed in this pull request:
/cc @nats-io/core