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

influx-data configuration sample #39

Open
floatas opened this issue Oct 20, 2018 · 0 comments
Open

influx-data configuration sample #39

floatas opened this issue Oct 20, 2018 · 0 comments

Comments

@floatas
Copy link

floatas commented Oct 20, 2018

Hello,
I'm just starting with AppMetrics and InfluxDb followed docs, but stuck on one issue for entire day.

https://www.app-metrics.io/reporting/reporters/influx-data/

I find this configuration example

var filter = new MetricsFilter().WhereType(MetricType.Timer);
var metrics = new MetricsBuilder()
    .Report.ToInfluxDb(
        options => {
            options.InfluxDb.BaseUri = new Uri("http://127.0.0.1:8086");
            options.InfluxDb.Database = "metricsdatabase";

            options.InfluxDb.Consistenency = "consistency";//Should be removed from sample

            options.InfluxDb.UserName = "admin";
            options.InfluxDb.Password = "password";

            options.InfluxDb.RetensionPolicy = "rp";//Should be removed from sample

            options.InfluxDb.CreateDataBaseIfNotExists = true;
            options.HttpPolicy.BackoffPeriod = TimeSpan.FromSeconds(30);
            options.HttpPolicy.FailuresBeforeBackoff = 5;
            options.HttpPolicy.Timeout = TimeSpan.FromSeconds(10);
            options.MetricsOutputFormatter = new MetricsInfluxDbLineProtocolOutputFormatter();
            options.Filter = filter;
            options.FlushInterval = TimeSpan.FromSeconds(20);
        })
    .Build();

I understand that BaseUri, database, username and password are required to report data and need to be changed accordingly, however consistency and retentionPolicy configs seems like defaults and I left them unchanged. This leads into new database being created in InfluxDb, but no data reported, fails silently.
Removed these two lines and everything works fine.

RetensionPolicy and Consistenency options are documented bellow with all other options, I think it would be best to remove these two lines from configuration sample.

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

No branches or pull requests

2 participants