dogstatsd

package
v0.0.0-...-dca2ff9 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2020 License: Apache-2.0 Imports: 24 Imported by: 0

README

package dogstatsd

This package is responsible for receiving metrics from external software over UDP. Every package has to follow the Dogstatsd format: http://docs.datadoghq.com/guides/dogstatsd/.

Metrics will be sent to the aggregator just like regular metrics from checks. This mean that aggregator and forwarder configuration will also inpact Dogstatsd.

Usage example:

// you must first initialize the aggregator, see aggregator.InitAggregator

// This will return an already running statd server ready to receive metrics
statsd, err := dogstatsd.NewServer(aggregatorInstance.GetBufferedChannels())

// ...

statsd.Stop()

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatDebugStats

func FormatDebugStats(stats []byte) (string, error)

FormatDebugStats returns a printable version of debug stats.

Types

type Server

type Server struct {
	Statistics *util.Stats
	Started    bool
	// contains filtered or unexported fields
}

Server represent a Dogstatsd server

func NewServer

func NewServer(samplePool *metrics.MetricSamplePool, samplesOut chan<- []metrics.MetricSample, eventsOut chan<- []*metrics.Event, servicesCheckOut chan<- []*metrics.ServiceCheck) (*Server, error)

NewServer returns a running Dogstatsd server

func (*Server) GetJSONDebugStats

func (s *Server) GetJSONDebugStats() ([]byte, error)

GetJSONDebugStats returns jsonified debug statistics.

func (*Server) Stop

func (s *Server) Stop()

Stop stops a running Dogstatsd server

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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