Git Product home page Git Product logo

layer-opentsdb's Introduction

Overview

OpenTSDB is a scalable time series database built on top of Hadoop and HBase. It simplifies the process of storing and analyzing large amounts of time-series data generated by endpoints like sensors or servers.

http://opentsdb.net

Usage

Deployment

Deploy the OpenTSDB charm:

juju deploy cs:~tengu-team/opentsdb-0

For OpenTSDB to work you need to deploy HBase and Zookeeper:

juju deploy hbase
juju deploy zookeeper

Add the relations when you got HBase and Zookeeper running:

juju add-relation opentsdb hbase
juju add-relation opentsdb zookeeper

To make OpenTSDB's GUI public you have to expose OpenTSDB:

juju expose opentsdb

Browse to the public IP with port to see OpenTSDB's GUI. Here you can select metrics and graph them.

How OpenTSDB can be used

HTTP API

You can communicate with OpenTSDB by using the HTTP API. For storing data the endpoint '/api/put' is used, for example:

35.194.184.37:4242/api/put

With as JSON body:

{
    "metric": "sys.cpu.nice",
    "timestamp": 1346846400,
    "value": 18,
    "tags": {
       "host": "web01",
       "dc": "lga"
    }
}

HTTP API documentation

TCollector

TCollector is a client-side process that gathers data from local collectors and pushes the data to OpenTSDB.

TCollector documentation

Graph

In order to inspect metrics you must go to OpenTSDB's GUI by browsing to the public IP and port (after you exposed the charm). There you can select metrics for a certain timeframe and plot them.

Telegraf

The Telegraf charm can be used with OpenTSDB. How to make it work:

  1. Deploy Telegraf:

    juju deploy cs:telegraf-6
  2. Add relation between the service you want to collect data from and Telegraf. For example if you want to collect metrics from your HAproxy instance and send them to OpenTSDB then you first have to add a relation to Telegraf:

    juju add-relation telegraf:juju-info haproxy:juju-info
  3. Update the outputs_config of the Telegraf charm:

    # Configuration for OpenTSDB server to send metrics to
    [[outputs.opentsdb]]
      ## prefix for metrics keys
      prefix = "my.specific.prefix."
    
      ## DNS name of the OpenTSDB server
      ## Using "opentsdb.example.com" or "tcp://opentsdb.example.com" will use the
      ## telnet API. "http://opentsdb.example.com" will use the Http API.
      host = "opentsdb.example.com"
    
      ## Port of the OpenTSDB server
      port = 4242
    
      ## Number of data points to send to OpenTSDB in Http requests.
      ## Not used with telnet API.
      httpBatchSize = 50
    
      ## Debug true - Prints OpenTSDB communication
      debug = false
    

Telegraf Charm

Important to know

Removing relation with HBase

When you remove the relation between OpenTSDB and HBase your data will not be removed from HBase. This prevents data loss from users that accidentally remove the relation between OpenTSDB and HBase.

To Do

  • Implement clustering

Contact Information

Authors

layer-opentsdb's People

Contributors

migsk avatar

Watchers

 avatar  avatar  avatar  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.