prometheus

package
v1.1.1 Latest Latest
Warning

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

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

Documentation

Overview

Package prometheus provides a Prometheus-based implementation of the MetricFactory abstraction.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Counter

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

Counter is a wrapper around a Prometheus Counter or CounterVec object.

func (*Counter) Add

func (m *Counter) Add(val float64, labelVals ...string)

Add adds the given amount to a counter.

func (*Counter) Inc

func (m *Counter) Inc(labelVals ...string)

Inc adds 1 to a counter.

func (*Counter) Value

func (m *Counter) Value(labelVals ...string) float64

Value returns the current amount of a counter.

type Gauge

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

Gauge is a wrapper around a Prometheus Gauge or GaugeVec object.

func (*Gauge) Add

func (m *Gauge) Add(val float64, labelVals ...string)

Add adds given value to a gauge.

func (*Gauge) Dec

func (m *Gauge) Dec(labelVals ...string)

Dec subtracts 1 from a gauge.

func (*Gauge) Inc

func (m *Gauge) Inc(labelVals ...string)

Inc adds 1 to a gauge.

func (*Gauge) Set

func (m *Gauge) Set(val float64, labelVals ...string)

Set sets the value of a gauge.

func (*Gauge) Value

func (m *Gauge) Value(labelVals ...string) float64

Value returns the current amount of a gauge.

type Histogram

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

Histogram is a wrapper around a Prometheus Histogram or HistogramVec object.

func (*Histogram) Info

func (m *Histogram) Info(labelVals ...string) (uint64, float64)

Info returns the count and sum of observations for the histogram.

func (*Histogram) Observe

func (m *Histogram) Observe(val float64, labelVals ...string)

Observe adds a single observation to the histogram.

type MetricFactory

type MetricFactory struct {
	Prefix string
}

MetricFactory allows the creation of Prometheus-based metrics.

func (MetricFactory) NewCounter

func (pmf MetricFactory) NewCounter(name, help string, labelNames ...string) monitoring.Counter

NewCounter creates a new Counter object backed by Prometheus.

func (MetricFactory) NewGauge

func (pmf MetricFactory) NewGauge(name, help string, labelNames ...string) monitoring.Gauge

NewGauge creates a new Gauge object backed by Prometheus.

func (MetricFactory) NewHistogram

func (pmf MetricFactory) NewHistogram(name, help string, labelNames ...string) monitoring.Histogram

NewHistogram creates a new Histogram object backed by Prometheus.

Directories

Path Synopsis
The etcdiscover binary monitors etcd to track the set of instances that support a gRPC service, and updates a file so that Prometheus can track those instances.
The etcdiscover binary monitors etcd to track the set of instances that support a gRPC service, and updates a file so that Prometheus can track those instances.

Jump to

Keyboard shortcuts

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