localmetrics

package
v0.0.0-...-dccb77e Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ReconcileDuration = prometheus.NewHistogramVec(prometheus.HistogramOpts{
		Name:        "cgao_reconcile_duration_seconds",
		Help:        "Distribution of the number of seconds a Reconcile takes, broken down by controller",
		ConstLabels: prometheus.Labels{"name": "configure-goalert-operator"},
		Buckets:     []float64{0.001, 0.01, 0.1, 1, 5, 10, 20},
	}, []string{"controller"})
	MetricCGAOCreateFailure = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Name:        "cgao_create_failure",
		Help:        "Metric for the number of failures creating Goalert service.",
		ConstLabels: prometheus.Labels{"name": "configure-goalert-operator"},
	}, []string{"service_name"})

	MetricCGAODeleteFailure = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Name:        "cgao_delete_failure",
		Help:        "Metric for the number of failures deleting a Goalert service.",
		ConstLabels: prometheus.Labels{"name": "configure-goalert-operator"},
	}, []string{"service_name"})
	MetricCGAOHeartbeatInactive = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Name:        "cgao_heartbeat_inactive",
		Help:        "Metric for inactive heartbeatmonitors in Goalert",
		ConstLabels: prometheus.Labels{"name": "configure-goalert-operator"},
	}, []string{"service_name"})
	MetricsList = []prometheus.Collector{
		ReconcileDuration,
		MetricCGAOCreateFailure,
		MetricCGAODeleteFailure,
		MetricCGAOHeartbeatInactive,
	}
)

Functions

func DeleteMetricCGAOHeartbeat

func DeleteMetricCGAOHeartbeat(svc string) bool

DeleteMetricCGAOHeartbeat removes heartbeat metrics for clusters in deletion

func SetReconcileDuration

func SetReconcileDuration(controller string, duration float64)

SetReconcileDuration tracks the duration of the reconcile loop

func UpdateMetricCGAOCreateFailure

func UpdateMetricCGAOCreateFailure(x int, svc string)

UpdateMetricCGAOCreateFailure updates gauge to 1 when creation fails

func UpdateMetricCGAODeleteFailure

func UpdateMetricCGAODeleteFailure(x int, svc string)

UpdateMetricCGAODeleteFailure updates gauge to 1 when deletion fails

func UpdateMetricCGAOHeartbeatInactive

func UpdateMetricCGAOHeartbeatInactive(x int, svc string)

UpdateMetricCGAOHeartbeatInactive updates gauge to 1 when heartbeat is inactive

Types

This section is empty.

Jump to

Keyboard shortcuts

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