Documentation ¶
Index ¶
- Constants
- type Number
- 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) Median() 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 ( // UDPMaxPacketSize is the UDP packet limit, see // https://en.wikipedia.org/wiki/User_Datagram_Protocol#Packet_structure UDPMaxPacketSize int = 64 * 1024 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Number ¶ added in v1.19.2
type Number float64
Number will get parsed as an int or float depending on what is passed
func (*Number) UnmarshalTOML ¶ added in v1.19.2
type RunningStats ¶
type RunningStats struct { PercLimit int // cache if we have sorted the list so that we never re-sort a sorted list, // which can have very bad performance. SortedPerc bool MedLimit int MedInsertIndex 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) Median ¶ added in v1.24.0
func (rs *RunningStats) Median() 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 []Number PercentileLimit int DeleteGauges bool DeleteCounters bool DeleteSets bool DeleteTimings bool ConvertNames bool `toml:"convert_names" deprecated:"0.12.0;2.0.0;use 'metric_separator' instead"` // 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 `toml:"parse_data_dog_tags" deprecated:"1.10.0;use 'datadog_extensions' instead"` // 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"` // Parses distribution metrics in the datadog statsd format. // Requires the DataDogExtension flag to be enabled. // https://docs.datadoghq.com/developers/metrics/types/?tab=distribution#definition DataDogDistributions bool `toml:"datadog_distributions"` // 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" deprecated:"0.12.1;2.0.0;option is ignored"` ReadBufferSize int `toml:"read_buffer_size"` SanitizeNamesMethod string `toml:"sanitize_name_method"` 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 *config.Duration `toml:"tcp_keep_alive_period"` // Max duration for each metric to stay cached without being updated. MaxTTL config.Duration `toml:"max_ttl"` 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 `toml:"-"` // contains filtered or unexported fields }
Statsd allows the importing of statsd and dogstatsd data.
func (*Statsd) SampleConfig ¶
Click to show internal directories.
Click to hide internal directories.