Documentation ¶
Overview ¶
Package opentsdb adds support for pushing stats to opentsdb.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Init ¶
func Init(prefix string)
Init attempts to create a singleton *opentsdb.backend and register it as a PushBackend. If it fails to create one, this is a noop. The prefix argument is an optional string to prepend to the name of every data point reported.
func InitWithoutServenv ¶ added in v0.11.0
func InitWithoutServenv(prefix string) (stats.PushBackend, error)
InitWithoutServenv initializes the opentsdb without servenv
Types ¶
type DataPoint ¶ added in v0.18.0
type DataPoint struct { // Example: sys.cpu.nice Metric string `json:"metric"` // Seconds or milliseconds since unix epoch. Timestamp float64 `json:"timestamp"` Value float64 `json:"value"` Tags map[string]string `json:"tags"` }
DataPoint represents a single OpenTSDB data point.
func (*DataPoint) MarshalText ¶ added in v0.18.0
type DataPointReader ¶ added in v0.18.0
type DataPointReader struct {
// contains filtered or unexported fields
}
DataPointReader parses bytes from io.Reader into DataPoints.
func NewDataPointReader ¶ added in v0.18.0
func NewDataPointReader(r io.Reader) *DataPointReader
func (*DataPointReader) Read ¶ added in v0.18.0
func (tr *DataPointReader) Read() (*DataPoint, error)
Read returns a DataPoint from the underlying io.Reader.
Returns an error if no DataPoint could be parsed.
Click to show internal directories.
Click to hide internal directories.