Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Accumulator ¶
type Accumulator interface { // Create a point with a value, decorating it with tags // NOTE: tags is expected to be owned by the caller, don't mutate // it after passing to Add. Add(measurement string, value interface{}, tags map[string]string, t ...time.Time) AddFields(measurement string, fields map[string]interface{}, tags map[string]string, t ...time.Time) Debug() bool SetDebug(enabled bool) }
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 { // Name returns the measurement name of the metric Name() string // Name returns the tags associated with the metric Tags() map[string]string // Time return the timestamp for the metric Time() time.Time // UnixNano returns the unix nano time of the metric UnixNano() int64 // Fields returns the fields for the metric Fields() map[string]interface{} // String returns a line-protocol string of the metric String() string // PrecisionString returns a line-protocol string of the metric, at precision PrecisionString(precison string) string // Point returns a influxdb client.Point object Point() *client.Point }
func NewMetric ¶
func NewMetric( name string, tags map[string]string, fields map[string]interface{}, t ...time.Time, ) (Metric, error)
NewMetric returns a metric with the given timestamp. If a timestamp is not given, then data is sent to the database without a timestamp, in which case the server will assign local time upon reception. NOTE: it is recommended to send data with a timestamp.
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 { // 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 // Start starts the ServiceInput's service, whatever that may be Start(Accumulator) error // Stop stops the services and closes any necessary channels and connections Stop() }
type ServiceOutput ¶
type ServiceOutput 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 // Start the "service" that will provide an Output Start() error // Stop the "service" that will provide an Output Stop() }
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
plugins
|
|
inputs/lustre2
Lustre 2.x telegraf plugin
|
Lustre 2.x telegraf plugin |
inputs/phpfpm
Package fcgi implements the FastCGI protocol.
|
Package fcgi implements the FastCGI protocol. |
Click to show internal directories.
Click to hide internal directories.