heka_opentsdb_output

package module
v0.0.0-...-0af5710 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2015 License: MIT Imports: 17 Imported by: 0

README

heka_opentsdb_output

OpenTSDB output plugin for heka

Notice

if you want use this plugin in heka, please change plugin_loader.cmake like this

add_external_plugin(git https://github.com/minktech/heka_opentsdb_plugin 22506252466c29ae22dbcce8541fafa624cce2cb)
externalproject_add(
	"bosun.org"
	GIT_REPOSITORY "https://github.com/bosun-monitor/bosun.git"
	GIT_TAG "ddc314f6b215ee053763fd08631d5995d1396c13"
	SOURCE_DIR "${PROJECT_PATH}/src/bosun.org"
	BUILD_COMMAND ""
	CONFIGURE_COMMAND ""
	INSTALL_COMMAND ""
	UPDATE_COMMAND "" # comment out to enable updates
)
add_dependencies(GoPackages "bosun.org")

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteDataToOpenTSDB

func WriteDataToOpenTSDB(mo *OpenTsdbOutput)

Types

type OpenTsdbEncoder

type OpenTsdbEncoder struct {
	*OpenTsdbEncoderConfig
}

func (*OpenTsdbEncoder) ConfigStruct

func (e *OpenTsdbEncoder) ConfigStruct() interface{}

func (*OpenTsdbEncoder) Encode

func (e *OpenTsdbEncoder) Encode(pack *PipelinePack) (output []byte, err error)

func (*OpenTsdbEncoder) Init

func (e *OpenTsdbEncoder) Init(config interface{}) (err error)

type OpenTsdbEncoderConfig

type OpenTsdbEncoderConfig struct {
	//the decode method, there are three methods:"json","bson","raw",
	//json decode message use Tags config and Value config
	//bson decode as json but treat payload as bson object
	//raw decode value from payload and tags from message
	Decode string
	Tags   []string
	Values []string
	//the metric root
	Metric     string
	TagIfEmpty map[string]string `toml:"tag_for_empty"`
}

type OpenTsdbOutput

type OpenTsdbOutput struct {
	*OpenTsdbOutputConfig
	// contains filtered or unexported fields
}

func (*OpenTsdbOutput) ConfigStruct

func (o *OpenTsdbOutput) ConfigStruct() interface{}

func (*OpenTsdbOutput) Init

func (o *OpenTsdbOutput) Init(config interface{}) (err error)

func (*OpenTsdbOutput) Run

func (*OpenTsdbOutput) SendDataPoints

func (o *OpenTsdbOutput) SendDataPoints(dps [][]byte, tsdb string) (*http.Response, error)

type OpenTsdbOutputConfig

type OpenTsdbOutputConfig struct {
	LogMsgChSize    int
	TsdbWritingSize int
	//the writer count
	TsdbWriterCount int
	//the time period of writing data to opentsdb
	TsdbWriteTimeout int
	//the url of opentsdb server
	Url string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL