Skip to content
This repository has been archived by the owner on Jan 1, 2021. It is now read-only.

syncromatics/KairosDbClientDotNet

Repository files navigation

KairosDbClientDotNet

This is a .NET library to send metrics to and receive metrics from KairosDB.

Quickstart

Sending Metrics

    Metric metric = new Metric("metric_name")
        .AddTag("server", "1")
        .AddDataPoint(new DataPoint(DateTime.UtcNow.MillisecondsSinceEpoch(), 5L);
        
    RestClient client = new RestClient("http://localhost:8083");
    await client.AddMetricsAsync(new [] {metric});

Querying DataPoints

    QueryMetric queryMetric = new QueryMetric("metric_name")
        .AddAggregator(new SumAggregator(1, TimeUnit.Minutes)
        .AddGroupBy(new GroupByTag("server"));
        
    QueryBuilder query = new QueryBuilder()
        .SetStart(TimeSpan.FromSeconds(5))
        .AddQueryMetric(queryMetric);
        
    RestClient client = new RestClient("http://localhost:8083");
    QueryResponse response = await client.QueryMetricsAsync(query);

Building

Travis NuGet NuGet Pre Release

Code of Conduct

We are committed to fostering an open and welcoming environment. Please read our code of conduct before participating in or contributing to this project.

Contributing

We welcome contributions and collaboration on this project. Please read our contributor's guide to understand how best to work with us.

License and Authors

GMV Syncromatics Engineering logo GMV Syncromatics Engineering

license GitHub contributors

This software is made available by GMV Syncromatics Engineering under the MIT license.