Simple openTSDB client for .net projects
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Notice: This is not the web page repository. If you are looking for this then try HERE


Build status

Introduction is a low weight, low impact implementation of a application to OpenTSDB bridge.


Although the openTSDB API is powerfull this library concentrates on one thing.

Getting data into the openTSDB

This is the only concern of this library. If you want a more complete interaction model then please contact me.



PM> Install-Package

From code

You can clone the project in into your local solution and use it as this.

This day in age this is highly discouraged.


Common setup

Before we can publish data to the openTSDB we have to provide some information, and initialaze a factory.

var tsdbManager = OpenTsdbFactory.TsdbManager(new TsdbOptions
    OpenTsdbServerUri = new Uri({openTsdbURI}),
    DefaultTags = new TagsCollection({hostName})

Two things have to be provided:

  • openTsdbURI : location of the openTSDB without the api relative part
  • hostName : the name of the host from which the data is published has to be provided.

Publlish single data point

There a two ways to publish a data point:

  • by creating the data point instance and sending it
  • using the shorthand method

Create data point instance

var dataPoint = new DataPoint<int>
    Value = {metricValue},
    Metric = "{metricName}",
    Timestamp = DateTime.Now.ToEpoch(),
    Tags = new TagsCollection()

var result = tsdbManager.Push(dataPoint);

Shorthand method

var result = tsdbManager.Push({metricName}, {metricValue});