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 presetupCurl callback to Gateway. #706

Merged
merged 2 commits into from
Jun 2, 2024
Merged

Conversation

nbelov-magdv
Copy link
Contributor

I use self-signed certificate, so I need possibility to add extra options for curl.

For example, for disabling check ssl certificate I do:

const prometheus::Labels Labels = prometheus::Gateway::GetInstanceLabel("https://pushgateway.prometheus.localhost");
prometheus::Gateway Gateway{
    "https://pushgateway.prometheus.localhost", "", "sample_client", Labels, {}, {}, {},
    [&](CURL* curl)
    {
        curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
    }
};

@gjasny gjasny merged commit 6492e82 into jupp0r:master Jun 2, 2024
10 checks passed
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