collectd

package
v0.9.0-rc25 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2015 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultPort = 25826

DefaultPort for collectd is 25826

Variables

This section is empty.

Functions

func ListenAndServe

func ListenAndServe(s *Server, iface string) error

ListenAndServe starts starts receiving collectd metrics via UDP and writes the received data points into the server's SeriesWriter. The serving goroutine is only stopped when s.Close() is called, but ListenAndServe returns immediately.

func Unmarshal

func Unmarshal(data *gollectd.Packet) []influxdb.Point

Unmarshal translates a collectd packet into InfluxDB data points.

Types

type SeriesWriter

type SeriesWriter interface {
	WriteSeries(database, retentionPolicy string, points []influxdb.Point) (uint64, error)
}

SeriesWriter defines the interface for the destination of the data.

type Server

type Server struct {
	Database string
	// contains filtered or unexported fields
}

Server represents a UDP server which receives metrics in collectd's binary protocol and stores them in InfluxDB.

func NewServer

func NewServer(w SeriesWriter, typesDBPath string) *Server

NewServer constructs a new Server.

func (*Server) Close

func (s *Server) Close() error

Close shuts down the server's listeners.

Jump to

Keyboard shortcuts

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