-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Active health check logs on every check instead of state change #6415
Comments
klaxa
pushed a commit
to klaxa/caddy
that referenced
this issue
Jun 23, 2024
klaxa
added a commit
to klaxa/caddy
that referenced
this issue
Jun 23, 2024
klaxa
added a commit
to klaxa/caddy
that referenced
this issue
Jun 23, 2024
Ping? |
klaxa
added a commit
to klaxa/caddy
that referenced
this issue
Jul 1, 2024
klaxa
added a commit
to klaxa/caddy
that referenced
this issue
Jul 3, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, first of all thanks for caddy, I enjoy using it!
I recently updated from 2.7.6 to 2.8.4, because I required the behavior of not following HTTP redirects on active health checks and noticed that, as opposed to 2.7.6, the newer version logs the host status on every active check when the host is up instead of only when the state changes from down to up.
I investigated the source and found that the logic was changed between the versions. In 2.7.6 the log was written when the event was emitted (https://github.com/caddyserver/caddy/blob/v2.7.6/modules/caddyhttp/reverseproxy/healthchecks.go#L443) while in 2.8.4 the emitting of the event was refactored into
markHealthy()
with the logging being moved to a higher level (https://github.com/caddyserver/caddy/blob/v2.8.4/modules/caddyhttp/reverseproxy/healthchecks.go#L495)I am not sure this is the intended behavior as it fills the log quickly with identical messages (except for the timestamp of course).
I think the simplest solution would be to move the logging of "host is up" (L495) into
markHealthy()
(after L428) because it checks for the previous state before emitting the event.Thank you and best regards!
The text was updated successfully, but these errors were encountered: