Giter Club home page Giter Club logo

opentsdb.net's Introduction

openTSDB.net


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


Build status

Introduction

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

Scope

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.

Installation

NuGet

PM> Install-Package openTSDB.net

Glossary

Term Definition
Named instance A instance of the manager that can be accessed using a globally unique name and the same instance shared by many
Anonymous instance A instance of the manager that can not be accessed using a name and therefore can not be retrieved multiple time from the factory
Manager The openTsdb factory is the entry point of the library, but the manager is the core implementation and object that the client is interacting with

Getting started

Hit the ground running

Working the factory

OpenTsdb.net uses a factory pattern to provide "unknown" and named instances of the manager.

Named instances

var tsdbManager = OpenTsdbFactory.Instance(TsdbOptions.New("http://localhost:4242"), "myInstance");

Where myInstance is the instance identifier.

If the instance was already initialized by someone else then the same instance will be returned.

Anonymous instance

var tsdbManager = OpenTsdbFactory.Instance(TsdbOptions.New("http://localhost:4242"));

Publishing data

The point of this all is to get data into the openTSDB database.

This can be done...

Quick and easy

If we want to publish only one data point then this can easily be achieved by

tsdbManager.PushAsync<int>("login", 1);

More control more code

There is also a longer way that provides more control over the data transmitted.

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

var result = tsdbManager.PushAsync<int>(dataPoint);

opentsdb.net's People

Contributors

dejanfajfar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.