exporter

package
v3.0.0-rc0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package exporter provides the interface for getting metrics out of mtail, into your monitoring system of choice.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exporter

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

Exporter manages the export of metrics to passive and active collectors.

func New

func New(o Options) (*Exporter, error)

New creates a new Exporter.

func (*Exporter) HandleJSON

func (e *Exporter) HandleJSON(w http.ResponseWriter, r *http.Request)

HandleJSON exports the metrics in JSON format via HTTP.

func (*Exporter) HandlePrometheusMetrics

func (e *Exporter) HandlePrometheusMetrics(w http.ResponseWriter, r *http.Request)

HandlePrometheusMetrics exports the metrics in a format readable by Prometheus via HTTP.

func (*Exporter) HandleVarz

func (e *Exporter) HandleVarz(w http.ResponseWriter, r *http.Request)

HandleVarz exports the metrics in Varz format via HTTP.

func (*Exporter) RegisterPushExport

func (e *Exporter) RegisterPushExport(p pushOptions)

RegisterPushExport adds a push export connection to the Exporter. Items in the list must describe a Dial()able connection and will have all the metrics pushed to each pushInterval.

func (*Exporter) StartMetricPush

func (e *Exporter) StartMetricPush()

StartMetricPush pushes metrics to the configured services each interval.

func (*Exporter) WriteMetrics

func (e *Exporter) WriteMetrics()

WriteMetrics writes metrics to each of the configured services. TODO(jaq) rename to PushMetrics.

type Options

type Options struct {
	Store    *metrics.Store
	Hostname string // Not required, uses os.Hostname if zero.
}

Options contains the required and optional parameters for constructing an Exporter.

Jump to

Keyboard shortcuts

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