metrics

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartMetricsServer

func StartMetricsServer(logger *zap.SugaredLogger)

Types

type GroupMetrics

type GroupMetrics struct {
	Site        string
	Group       string
	Port        string
	Protocol    string
	Tags        []string
	HostResults map[string]HostResult
	HostsUp     int
	HostsTotal  int
}

type HostResult added in v0.5.4

type HostResult struct {
	Success      bool
	ResponseTime time.Duration
	Error        error
}

type MetricLabels

type MetricLabels struct {
	Site     string
	Group    string
	Host     string
	Port     string
	Protocol string
}

type PrometheusMetrics

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

func NewPrometheusMetrics

func NewPrometheusMetrics(logger *zap.SugaredLogger, monitorSite string) *PrometheusMetrics

func (*PrometheusMetrics) UpdateCertificate

func (p *PrometheusMetrics) UpdateCertificate(site, group, host, port string, certInfo *checkers.CertInfo)

func (*PrometheusMetrics) UpdateGroup

func (p *PrometheusMetrics) UpdateGroup(metrics GroupMetrics)

Jump to

Keyboard shortcuts

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