Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultPort = 25826
DefaultPort for collectd is 25826
Variables ¶
This section is empty.
Functions ¶
func ListenAndServe ¶
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.
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.
Click to show internal directories.
Click to hide internal directories.