-
Notifications
You must be signed in to change notification settings - Fork 261
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
Support ping endpoint #456
Conversation
FYI, we're already handling the /ping, so there must be a recent issue, cf this PR. So if there is an issue, it's better to fix the heartbeat logic than creating a new ping logic. |
@mga-chka As I understand, chproxy can create heartbeats to ClickHouse cluster. Heartbeat config can be configured for
But on chproxy level I can't create > curl --request GET --url http://some_chproxy:8123/ping
"172.23.0.1:54784": unsupported path: "/ping" We faced this problem while integrating some BI instruments to chproxy which use |
my bad, you're right. |
Can you add tests (in main_test.go) to ensure the /ping works when it's put on and doesn't work when it's off. |
Ok, I will add tests and remove debug.yml. |
@mga-chka, hi! I've:
All tests are passed. |
great, the linter is still not happy, cf the last build |
@mga-chka I've:
|
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.
looks good to me. I'm waiting a few days before merging in case another reviewer wants to look at the PR
Description
It's similar with #127 issue.
chproxy returns HTTP 200 response for
/ping
endpoint and not proxying this request.I want to add
/ping
endpoint to proxy, because some of BI instruments use this endpoint by default for healthchecks.Pull request type
Feature
/ping
endpoint.allow_ping
to config on global scope for enablingping
endpoint proxying.Does this introduce a breaking change?
Further comments
I've created config option on global scope in first version. If you think that it's necessary to create it on
network_groups
orserver
section (to allow ping endpoint only from some networks), then I can do that.