stackdriver

package
v1.0.0-...-47f3d97 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2019 License: MIT Imports: 11 Imported by: 0

README

Stackdriver Output Plugin

This plugin writes to the Google Cloud Stackdriver API and requires authentication with Google Cloud using either a service account or user credentials. See the Stackdriver documentation for details on pricing.

Requires project to specify where Stackdriver metrics will be delivered to.

Metrics are grouped by the namespace variable and metric key - eg: custom.googleapis.com/telegraf/system/load5

Configuration
[[outputs.stackdriver]]
  # GCP Project
  project = "erudite-bloom-151019"

  # The namespace for the metric descriptor
  namespace = "telegraf"

Documentation

Index

Constants

View Source
const (
	// QuotaLabelsPerMetricDescriptor is the limit
	// to labels (tags) per metric descriptor.
	QuotaLabelsPerMetricDescriptor = 10
	// QuotaStringLengthForLabelKey is the limit
	// to string length for label key.
	QuotaStringLengthForLabelKey = 100
	// QuotaStringLengthForLabelValue is the limit
	// to string length for label value.
	QuotaStringLengthForLabelValue = 1024

	// StartTime for cumulative metrics.
	StartTime = int64(1)
	// MaxInt is the max int64 value.
	MaxInt = int(^uint(0) >> 1)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Stackdriver

type Stackdriver struct {
	Project   string
	Namespace string
	// contains filtered or unexported fields
}

Stackdriver is the Google Stackdriver config info.

func (*Stackdriver) Close

func (s *Stackdriver) Close() error

Close will terminate the session to the backend, returning error if an issue arises.

func (*Stackdriver) Connect

func (s *Stackdriver) Connect() error

Connect initiates the primary connection to the GCP project.

func (*Stackdriver) Description

func (s *Stackdriver) Description() string

Description returns the human-readable function definition of the plugin.

func (*Stackdriver) SampleConfig

func (s *Stackdriver) SampleConfig() string

SampleConfig returns the formatted sample configuration for the plugin.

func (*Stackdriver) Write

func (s *Stackdriver) Write(metrics []telegraf.Metric) error

Write the metrics to Google Cloud Stackdriver.

Jump to

Keyboard shortcuts

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