application_insights

package
v0.0.0-...-535192b Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2019 License: MIT Imports: 9 Imported by: 0

README

Application Insights Output Plugin

This plugin writes telegraf metrics to Azure Application Insights.

Configuration:
[[outputs.application_insights]]
  ## Instrumentation key of the Application Insights resource.
  instrumentation_key = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx"

  ## Timeout for closing (default: 5s).
  # timeout = "5s"

  ## Enable additional diagnostic logging.
  # enable_diagnostic_logging = false

  ## Context Tag Sources add Application Insights context tags to a tag value.
  ##
  ## For list of allowed context tag keys see:
  ## https://github.com/Microsoft/ApplicationInsights-Go/blob/master/appinsights/contracts/contexttagkeys.go
  # [outputs.application_insights.context_tag_sources]
  #   "ai.cloud.role" = "kubernetes_container_name"
  #   "ai.cloud.roleInstance" = "kubernetes_pod_name"
Metric Encoding:

For each field an Application Insights Telemetry record is created named based on the measurement name and field.

Example: Create the telemetry records foo_first and foo_second:

foo,host=a first=42,second=43 1525293034000000000

In the special case of a single field named value, a single telemetry record is created named using only the measurement name

Example: Create a telemetry record bar:

bar,host=a value=42 1525293034000000000

Documentation

Index

Constants

View Source
const (
	Error   = "E! "
	Warning = "W! "
	Info    = "I! "
	Debug   = "D! "
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationInsights

type ApplicationInsights struct {
	InstrumentationKey      string
	Timeout                 internal.Duration
	EnableDiagnosticLogging bool
	ContextTagSources       map[string]string
	// contains filtered or unexported fields
}

func (*ApplicationInsights) Close

func (a *ApplicationInsights) Close() error

func (*ApplicationInsights) Connect

func (a *ApplicationInsights) Connect() error

func (*ApplicationInsights) Description

func (a *ApplicationInsights) Description() string

func (*ApplicationInsights) SampleConfig

func (a *ApplicationInsights) SampleConfig() string

func (*ApplicationInsights) Write

func (a *ApplicationInsights) Write(metrics []telegraf.Metric) error

type DiagnosticsMessageSubscriber

type DiagnosticsMessageSubscriber interface {
	Subscribe(appinsights.DiagnosticsMessageHandler) appinsights.DiagnosticsMessageListener
}

type TelemetryTransmitter

type TelemetryTransmitter interface {
	Track(appinsights.Telemetry)
	Close() <-chan struct{}
}

type Transmitter

type Transmitter struct {
	// contains filtered or unexported fields
}

func NewTransmitter

func NewTransmitter(ikey string) *Transmitter

func (*Transmitter) Close

func (t *Transmitter) Close() <-chan struct{}

func (*Transmitter) Track

func (t *Transmitter) Track(telemetry appinsights.Telemetry)

Directories

Path Synopsis
Code generated by mockery v1.0.0
Code generated by mockery v1.0.0

Jump to

Keyboard shortcuts

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