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

Add http_pingpong #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add http_pingpong #11

wants to merge 1 commit into from

Conversation

mrceyhun
Copy link
Contributor

It is useful to expose metrics behind authentication service, like cherrypy. Since localhost is exempted from authentication, http_pingpong can safely return results of service behind authentication.

Example scenario:

  • We would like to get metrics of http://IP:8270/crabserver/metrics
  • Run http_pingpong in same pod and provide another internal port to it, i.e.: default 17000
  • Provide -uri parameter as http://localhost:8270/crabserver/metrics, -port parameter as 17000, -endpoint as /metrics:

go run http_pingpong.go -port ":17000" -endpoint "/metrics" -uri http://localhost:8270/crabserver/metrics

Now, we can reach crabserver/metrics response via curl http://IP:17000/metrics. Of course, in prod prebuilt executable will be used.

fyi @mapellidario @novicecpp , what do you think?

@mapellidario
Copy link
Member

Sorry for the delay, I noticed the notification only now. It looks perfect to me, thank you veeery much! :)

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

Successfully merging this pull request may close these issues.

2 participants