Documentation ¶
Index ¶
- Constants
- type RunningStats
- func (rs *RunningStats) AddValue(v float64)
- func (rs *RunningStats) Count() int64
- func (rs *RunningStats) Lower() float64
- func (rs *RunningStats) Mean() float64
- func (rs *RunningStats) Percentile(n float64) float64
- func (rs *RunningStats) Stddev() float64
- func (rs *RunningStats) Sum() float64
- func (rs *RunningStats) Upper() float64
- func (rs *RunningStats) Variance() float64
- type Statsd
Constants ¶
View Source
const ( // UDP_MAX_PACKET_SIZE is the UDP packet limit, see // https://en.wikipedia.org/wiki/User_Datagram_Protocol#Packet_structure UDP_MAX_PACKET_SIZE int = 64 * 1024 MaxTCPConnections = 250 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RunningStats ¶
type RunningStats struct { PercLimit int // contains filtered or unexported fields }
RunningStats calculates a running mean, variance, standard deviation, lower bound, upper bound, count, and can calculate estimated percentiles. It is based on the incremental algorithm described here:
https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance
func (*RunningStats) AddValue ¶
func (rs *RunningStats) AddValue(v float64)
func (*RunningStats) Count ¶
func (rs *RunningStats) Count() int64
func (*RunningStats) Lower ¶
func (rs *RunningStats) Lower() float64
func (*RunningStats) Mean ¶
func (rs *RunningStats) Mean() float64
func (*RunningStats) Percentile ¶
func (rs *RunningStats) Percentile(n float64) float64
func (*RunningStats) Stddev ¶
func (rs *RunningStats) Stddev() float64
func (*RunningStats) Sum ¶ added in v1.14.0
func (rs *RunningStats) Sum() float64
func (*RunningStats) Upper ¶
func (rs *RunningStats) Upper() float64
func (*RunningStats) Variance ¶
func (rs *RunningStats) Variance() float64
type Statsd ¶
type Statsd struct { // Protocol used on listener - udp or tcp Protocol string `toml:"protocol"` // Address & Port to serve from ServiceAddress string // Number of messages allowed to queue up in between calls to Gather. If this // fills up, packets will get dropped until the next Gather interval is ran. AllowedPendingMessages int // Percentiles specifies the percentiles that will be calculated for timing // and histogram stats. Percentiles []internal.Number PercentileLimit int DeleteGauges bool DeleteCounters bool DeleteSets bool DeleteTimings bool ConvertNames bool // MetricSeparator is the separator between parts of the metric name. MetricSeparator string // This flag enables parsing of tags in the dogstatsd extension to the // statsd protocol (http://docs.datadoghq.com/guides/dogstatsd/) ParseDataDogTags bool // depreciated in 1.10; use datadog_extensions // Parses extensions to statsd in the datadog statsd format // currently supports metrics and datadog tags. // http://docs.datadoghq.com/guides/dogstatsd/ DataDogExtensions bool `toml:"datadog_extensions"` // UDPPacketSize is deprecated, it's only here for legacy support // we now always create 1 max size buffer and then copy only what we need // into the in channel // see https://github.com/influxdata/telegraf/pull/992 UDPPacketSize int `toml:"udp_packet_size"` ReadBufferSize int `toml:"read_buffer_size"` sync.Mutex // bucket -> influx templates Templates []string // Protocol listeners UDPlistener *net.UDPConn TCPlistener *net.TCPListener MaxTCPConnections int `toml:"max_tcp_connections"` TCPKeepAlive bool `toml:"tcp_keep_alive"` TCPKeepAlivePeriod *internal.Duration `toml:"tcp_keep_alive_period"` MaxConnections selfstat.Stat CurrentConnections selfstat.Stat TotalConnections selfstat.Stat TCPPacketsRecv selfstat.Stat TCPBytesRecv selfstat.Stat UDPPacketsRecv selfstat.Stat UDPPacketsDrop selfstat.Stat UDPBytesRecv selfstat.Stat ParseTimeNS selfstat.Stat Log telegraf.Logger // contains filtered or unexported fields }
Statsd allows the importing of statsd and dogstatsd data.
func (*Statsd) Description ¶
func (*Statsd) SampleConfig ¶
Click to show internal directories.
Click to hide internal directories.