Skip to content
forked from bodji/gopentsdb

GopenTSDB is a light golang module to push some metrics to a OpenTSDB instance (via raw socket)

Notifications You must be signed in to change notification settings

root-gg/gopentsdb

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GOpenTSDB

####Simple golang library to push some metrics to an OpenTSDB instance via raw socket.

Installation

go get github.com/bodji/opentsdb

Usage

opentsdb := gopentsdb.NewOpenTsdb("192.168.1.1", 4242, true, true)

// Create some tags
tags := make(map[string]string)
tags["partition"]   = "1"
tags["disk"]        = "sda"


// Create Put
put := gopentsdb.NewPut("disk_occupation", tags, 13.37)

// Send it to OpenTSDB
_, err := opentsdb.Put( put )
if err != nil {
 log.Printf("Fail to push to OpenTSDB : %s", err)
}

Documentation

http://godoc.org/github.com/bodji/gopentsdb

Todo

  • Replace forbidden characters in metric name, tags name, and tags values
  • Stack puts while opentsdb is not available to send them later

About

GopenTSDB is a light golang module to push some metrics to a OpenTSDB instance (via raw socket)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%