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

Custom httpclient support #88

Open
chou-godaddy opened this issue Apr 1, 2025 · 1 comment · May be fixed by #89
Open

Custom httpclient support #88

chou-godaddy opened this issue Apr 1, 2025 · 1 comment · May be fixed by #89

Comments

@chou-godaddy
Copy link

Problem

I need to push metrics that requires mutual TLS authentication with client certificates. The current implementation in push.go uses a private HTTP client that can't be customized from outside the package.

This creates a dilemma:

  1. Either modify the global HTTP DefaultTransport (which affects all HTTP clients in the application)
  2. Or create a custom pusher with a custom HTTP client with specific TLS configuration

Question

Has anyone else needed to push metrics to the storage endpoint requiring client certificates or custom TLS configurations? How have you solved this problem?

Potential Solutions

I see a few possible ways to address this:

  1. Add a CustomClient field to the existing PushOptions struct
  2. Create new functions that accept a custom HTTP client

I'd appreciate any guidance on the best approach that aligns with the project's design philosophy before submitting a pull request.

@tiny-pangolin
Copy link

For handling mTLS authentication, we recommend placing vmauth in front of Victoriametrics and use vmauth for handling mTLS. You can also handle mTLS using a different reverse proxy like Traefik

@chou-godaddy chou-godaddy linked a pull request Apr 3, 2025 that will close this issue
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 a pull request may close this issue.

2 participants