AppMetrics / InfluxDB

App Metrics Extensions for InfluxDB reporting
https://www.app-metrics.io/reporting/reporters/influx-data/
Apache License 2.0
17 stars 13 forks source link

Influx SSL not working #24

Closed alhardy closed 6 years ago

alhardy commented 6 years ago

From @mts57017 on January 17, 2018 13:41

i am running a .NET Core 2 API.... here is the config....

public static IWebHost BuildWebHost(string[] args) => WebHost.CreateDefaultBuilder(args).ConfigureMetricsWithDefaults(builder => { builder.Configuration.Configure(options => { options.DefaultContextLabel = "Data Load API"; options.GlobalTags.Add("test tag", "test value"); options.Enabled = true; options.ReportingEnabled = true; }).Report.ToInfluxDb(options => { options.InfluxDb.BaseUri = new Uri("https://"); options.InfluxDb.Database = ""; options.InfluxDb.UserName = ""; options.InfluxDb.Password = ""; options.HttpPolicy.BackoffPeriod = TimeSpan.FromSeconds(30); options.HttpPolicy.FailuresBeforeBackoff = 5; options.HttpPolicy.Timeout = TimeSpan.FromSeconds(10); options.MetricsOutputFormatter = new MetricsJsonOutputFormatter(); options.FlushInterval = TimeSpan.FromSeconds(20); }); }).UseMetrics().UseHealthEndpoints() .UseStartup() .Build(); }

the above returns the following....

"context": "appmetrics.internal", "apdexScores": [], "counters": [ { "name": "report_failed", "unit": "items", "count": 13, "items": [ { "count": 13, "item": "App.Metrics.Reporting.InfluxDB.InfluxDbMetricsReporter", "percent": 100.0 } ], "tags": { "server": "abb2533aac4e", "app": "DataCacheAPI", "env": "development", "test tag": "test value" } } ],

any ideas as to what is causing this?

Copied from original issue: AppMetrics/AppMetrics#214

alhardy commented 6 years ago

off the top of my head no, I'll have to dig in

alhardy commented 6 years ago

SSL works fine me for on the latest version. What's the exception you are getting and are you using a self signed cert?

mts57017 commented 6 years ago

the provider changed it over from a self signed to a public one, so i wouldn't think that would be an issue...right?

mts57017 commented 6 years ago

not an exception, when you go to the metrics page, i can see the failed sends

mts57017 commented 6 years ago

do my setting look right above?

alhardy commented 6 years ago

Hard to tell, obvious questions, confirmed the dbname, username and password are correct?

I'd say the best way is to pull this repo down and update the configuration in the sandbox project and give it a run.

You're referring to the "metrics page" of your provider?

Do you see error's logged from App Metrics in your app?, see here

What are the details of errors you are getting on the "metrics page"?

alhardy commented 6 years ago

Cannot replicate