metrics

package
v0.1.56 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2025 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Containers = NewGauge("containers", "Total containers running", []string{"container", "status"})
View Source
var ContainersHistory = NewGauge("containers_history", "Total containers running", []string{"container", "status"})
View Source
var DatabaseGet = NewCounter("database_get_total", "Total database get operations", []string{})
View Source
var DatabaseGetKeysPrefix = NewCounter("database_get_prefix_total", "Total database set operations", []string{})
View Source
var DatabasePropose = NewCounter("database_propose_total", "Total database set operations", []string{})
View Source
var DatabaseRemove = NewCounter("database_remove_total", "Total database set operations", []string{})
View Source
var DatabaseSet = NewCounter("database_set_total", "Total database set operations", []string{})
View Source
var DockerVersion = NewCounter("docker_version", "Docker daemon version", []string{"docker_version"})
View Source
var SmrVersion = NewCounter("smr_version", "Simplecontainer version", []string{"smr_version"})

Functions

This section is empty.

Types

type Counter

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

func NewCounter

func NewCounter(name string, help string, labels []string) *Counter

func (*Counter) Get added in v0.1.56

func (c *Counter) Get() *prometheus.CounterVec

func (*Counter) Increment

func (c *Counter) Increment(labels ...string)

func (*Counter) Register

func (c *Counter) Register()

type Gauge

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

func NewGauge

func NewGauge(name string, help string, labels []string) *Gauge

func (*Gauge) Get added in v0.1.56

func (g *Gauge) Get() *prometheus.GaugeVec

func (*Gauge) Register

func (g *Gauge) Register()

func (*Gauge) Set

func (g *Gauge) Set(value float64, labels ...string)

type Histogram

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

func NewHistogram

func NewHistogram(name string, help string, labels []string) *Histogram

func (*Histogram) Get added in v0.1.56

func (h *Histogram) Get() *prometheus.HistogramVec

func (*Histogram) Observe

func (h *Histogram) Observe(value float64, labels ...string)

func (*Histogram) Register

func (h *Histogram) Register()

type Metric

type Metric interface {
	Register()
}

Metric is an interface that all Prometheus metrics must implement.

type MetricType

type MetricType string

MetricType is an enum-like type to represent different types of metrics.

const (
	CounterType   MetricType = "counter"
	GaugeType     MetricType = "gauge"
	HistogramType MetricType = "histogram"
)

Jump to

Keyboard shortcuts

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