writer

package
v3.1.11+incompatible Latest Latest
Warning

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

Go to latest
Published: May 23, 2018 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package writer contains the SignalFx writer. The writer is responsible for sending datapoints and events to SignalFx ingest. Ideally all data would flow through here, but right now a lot of it is written to ingest by collectd.

The writer provides a channel that all monitors can submit datapoints on. All monitors should include the "monitorType" key in the `Meta` map of the datapoint for use in filtering.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SignalFxWriter

type SignalFxWriter struct {

	// map that holds host-specific ids like AWSUniqueID
	HostIDDims map[string]string
	// contains filtered or unexported fields
}

SignalFxWriter is what sends events and datapoints to SignalFx ingest. It receives events/datapoints on two buffered channels and writes them to SignalFx on a regular interval.

func New

func New() *SignalFxWriter

New creates a new un-configured writer

func (*SignalFxWriter) Configure

func (sw *SignalFxWriter) Configure(conf *config.WriterConfig) error

Configure configures and starts up a routine that writes any datapoints or events that come in on the exposed channels.

func (*SignalFxWriter) DPChannel

func (sw *SignalFxWriter) DPChannel() chan<- *datapoint.Datapoint

DPChannel returns a channel that datapoints can be fed into that will be sent to SignalFx ingest.

func (*SignalFxWriter) DiagnosticText

func (sw *SignalFxWriter) DiagnosticText() string

DiagnosticText outputs a string that describes the state of the writer to a human.

func (*SignalFxWriter) DimPropertiesChannel

func (sw *SignalFxWriter) DimPropertiesChannel() chan<- *types.DimProperties

DimPropertiesChannel returns a channel that datapoints can be fed into that will be sent to SignalFx ingest.

func (*SignalFxWriter) EventChannel

func (sw *SignalFxWriter) EventChannel() chan<- *event.Event

EventChannel returns a channel that events can be fed into that will be sent to SignalFx ingest.

func (*SignalFxWriter) InternalMetrics

func (sw *SignalFxWriter) InternalMetrics() []*datapoint.Datapoint

InternalMetrics returns a set of metrics showing how the writer is currently doing.

func (*SignalFxWriter) Shutdown

func (sw *SignalFxWriter) Shutdown()

Shutdown the writer and stop sending datapoints

Jump to

Keyboard shortcuts

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