prometheus

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

type Metrics struct {
	TopicsChecked       prometheus.Counter
	TopicCheckLatencyMs prometheus.Gauge

	ClientsChecked       prometheus.Counter
	ClientCheckLatencyMs prometheus.Gauge

	DevicesChecked       prometheus.Counter
	DeviceCheckLatencyMs prometheus.Gauge

	HubsChecked       prometheus.Counter
	HubCheckLatencyMs prometheus.Gauge

	SendDeviceConnected    prometheus.Counter
	SendDeviceDisconnected prometheus.Counter
	SendHubConnected       prometheus.Counter
	SendHubDisconnected    prometheus.Counter

	TotalConnected    prometheus.Gauge
	TotalDisconnected prometheus.Gauge
	// contains filtered or unexported fields
}

func NewMetrics

func NewMetrics(prefix string) *Metrics

func Start

func Start(ctx context.Context, config configuration.Config) (metrics *Metrics, err error)

func (*Metrics) ServeHTTP

func (this *Metrics) ServeHTTP(writer http.ResponseWriter, request *http.Request)

func (*Metrics) SetOnMetricsServeRequest

func (this *Metrics) SetOnMetricsServeRequest(f func())

Jump to

Keyboard shortcuts

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