Documentation ยถ
Index ยถ
Constants ยถ
This section is empty.
Variables ยถ
This section is empty.
Functions ยถ
This section is empty.
Types ยถ
type Accumulator ยถ
type Accumulator interface { // AddFields adds a metric to the accumulator with the given measurement // name, fields, and tags (and timestamp). If a timestamp is not provided, // then the accumulator sets it to "now". AddFields(measurement string, fields map[string]interface{}, tags map[string]string, t ...time.Time) // AddGauge is the same as AddFields, but will add the metric as a "Gauge" type AddGauge(measurement string, fields map[string]interface{}, tags map[string]string, t ...time.Time) // AddCounter is the same as AddFields, but will add the metric as a "Counter" type AddCounter(measurement string, fields map[string]interface{}, tags map[string]string, t ...time.Time) // AddSummary is the same as AddFields, but will add the metric as a "Summary" type AddSummary(measurement string, fields map[string]interface{}, tags map[string]string, t ...time.Time) // AddHistogram is the same as AddFields, but will add the metric as a "Histogram" type AddHistogram(measurement string, fields map[string]interface{}, tags map[string]string, t ...time.Time) // AddMetric adds an metric to the accumulator. AddMetric(Metric) // SetPrecision sets the timestamp rounding precision. All metrics addeds // added to the accumulator will have their timestamp rounded to the // nearest multiple of precision. SetPrecision(precision time.Duration) // Report an error. AddError(err error) // Upgrade to a TrackingAccumulator with space for maxTracked // metrics/batches. WithTracking(maxTracked int) TrackingAccumulator }
Accumulator allows adding metrics to the processing flow.
type AggregatingOutput ยถ
type AggregatingOutput interface { Output // Add the metric to the aggregator Add(in Metric) // Push returns the aggregated metrics and is called every flush interval. Push() []Metric // Reset signals the the aggregator period is completed. Reset() }
AggregatingOutput adds aggregating functionality to an Output. May be used if the Output only accepts a fixed set of aggregations over a time period. These functions may be called concurrently to the Write function.
type Aggregator ยถ
type Aggregator interface { // SampleConfig returns the default configuration of the Input. SampleConfig() string // Description returns a one-sentence description on the Input. Description() string // Add the metric to the aggregator. Add(in Metric) // Push pushes the current aggregates to the accumulator. Push(acc Accumulator) // Reset resets the aggregators caches and aggregates. Reset() }
Aggregator is an interface for implementing an Aggregator plugin. the RunningAggregator wraps this interface and guarantees that Add, Push, and Reset can not be called concurrently, so locking is not required when implementing an Aggregator plugin.
type DeliveryInfo ยถ
type DeliveryInfo interface { // ID is the TrackingID ID() TrackingID // Delivered returns true if the metric was processed successfully. Delivered() bool }
DeliveryInfo provides the results of a delivered metric group.
type Initializer ยถ
type Initializer interface { // Init performs one time setup of the plugin and returns an error if the // configuration is invalid. Init() error }
Initializer is an interface that all plugin types: Inputs, Outputs, Processors, and Aggregators can optionally implement to initialize the plugin.
type Input ยถ
type Input interface { // SampleConfig returns the default configuration of the Input SampleConfig() string // Description returns a one-sentence description on the Input Description() string // Gather takes in an accumulator and adds the metrics that the Input // gathers. This is called every "interval" Gather(Accumulator) error }
type Metric ยถ
type Metric interface { // Getting data structure functions Name() string Tags() map[string]string TagList() []*Tag Fields() map[string]interface{} FieldList() []*Field Time() time.Time Type() ValueType // Name functions SetName(name string) AddPrefix(prefix string) AddSuffix(suffix string) // Tag functions GetTag(key string) (string, bool) HasTag(key string) bool AddTag(key, value string) RemoveTag(key string) // Field functions GetField(key string) (interface{}, bool) HasField(key string) bool AddField(key string, value interface{}) RemoveField(key string) SetTime(t time.Time) // HashID returns an unique identifier for the series. HashID() uint64 // Copy returns a deep copy of the Metric. Copy() Metric // Accept marks the metric as processed successfully and written to an // output. Accept() // Reject marks the metric as processed unsuccessfully. Reject() // Drop marks the metric as processed successfully without being written // to any output. Drop() // Mark Metric as an aggregate SetAggregate(bool) IsAggregate() bool }
type Output ยถ
type Output interface { // Connect to the Output Connect() error // Close any connections to the Output Close() error // Description returns a one-sentence description on the Output Description() string // SampleConfig returns the default configuration of the Output SampleConfig() string // Write takes in group of points to be written to the Output Write(metrics []Metric) error }
type ServiceInput ยถ
type ServiceInput interface { Input // Start the ServiceInput. The Accumulator may be retained and used until // Stop returns. Start(Accumulator) error // Stop stops the services and closes any necessary channels and connections Stop() }
type TrackingAccumulator ยถ
type TrackingAccumulator interface { Accumulator // Add the Metric and arrange for tracking feedback after processing.. AddTrackingMetric(m Metric) TrackingID // Add a group of Metrics and arrange for a signal when the group has been // processed. AddTrackingMetricGroup(group []Metric) TrackingID // Delivered returns a channel that will contain the tracking results. Delivered() <-chan DeliveryInfo }
TrackingAccumulator is an Accumulator that provides a signal when the metric has been fully processed. Sending more metrics than the accumulator has been allocated for without reading status from the Accepted or Rejected channels is an error.
Source Files ยถ
Directories ยถ
Path | Synopsis |
---|---|
cmd
|
|
plugins
|
|
inputs/docker
Helper functions copied from https://github.com/docker/cli/blob/master/cli/command/container/stats_helpers.go
|
Helper functions copied from https://github.com/docker/cli/blob/master/cli/command/container/stats_helpers.go |
inputs/jti_openconfig_telemetry/auth
Package authentication is a generated protocol buffer package.
|
Package authentication is a generated protocol buffer package. |
inputs/jti_openconfig_telemetry/oc
Package telemetry is a generated protocol buffer package.
|
Package telemetry is a generated protocol buffer package. |
inputs/lustre2
Lustre 2.x telegraf plugin
|
Lustre 2.x telegraf plugin |
inputs/minecraft/internal/rcon
Package rcon implements the communication protocol for communicating with RCON servers.
|
Package rcon implements the communication protocol for communicating with RCON servers. |
inputs/neptune_apex
Package neptuneapex implements an input plugin for the Neptune Apex aquarium controller.
|
Package neptuneapex implements an input plugin for the Neptune Apex aquarium controller. |
inputs/phpfpm
Package fcgi implements the FastCGI protocol.
|
Package fcgi implements the FastCGI protocol. |
inputs/x509_cert
Package x509_cert reports metrics from an SSL certificate.
|
Package x509_cert reports metrics from an SSL certificate. |
inputs/zipkin/cmd/thrift_serialize
A small cli utility meant to convert json to zipkin thrift binary format, and vice versa.
|
A small cli utility meant to convert json to zipkin thrift binary format, and vice versa. |
outputs/application_insights/mocks
Code generated by mockery v1.0.0
|
Code generated by mockery v1.0.0 |
selfstat is a package for tracking and collecting internal statistics about telegraf.
|
selfstat is a package for tracking and collecting internal statistics about telegraf. |