Skip to content
This repository was archived by the owner on Jul 18, 2023. It is now read-only.

Conversation

cvalerio
Copy link

Small change that allows users to pass a custom HttpMessageHandler to InfluxDb method, allowing to bypass certificate check for self signed certificates on server.

Usage:

         var handler = new HttpClientHandler
         {
            ServerCertificateCustomValidationCallback = (message, cert, chain, errors) => true
         };
         Metrics.Collector = new CollectorConfiguration()
            .Tag.With("host", Config["hostname"])
            .Batch.AtInterval(TimeSpan.FromSeconds(2))
            .WriteTo.InfluxDB(uri, Config["influxdbname"], Config["influxusername"], Config["influxpassword"], handler)
            .CreateCollector();

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant