metrics

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	K8gbGslbErrorsTotal               = "k8gb_gslb_errors_total"
	K8gbGslbHealthyRecords            = "k8gb_gslb_healthy_records"
	K8gbGslbReconciliationLoopsTotal  = "k8gb_gslb_reconciliation_loops_total"
	K8gbGslbServiceStatusNum          = "k8gb_gslb_service_status_num"
	K8gbGslbStatusCountForFailover    = "k8gb_gslb_status_count_for_failover"
	K8gbGslbStatusCountForRoundrobin  = "k8gb_gslb_status_count_for_roundrobin"
	K8gbGslbStatusCountForGeoIP       = "k8gb_gslb_status_count_for_geoip"
	K8gbInfobloxHeartbeatsTotal       = "k8gb_infoblox_heartbeats_total"
	K8gbInfobloxHeartbeatErrorsTotal  = "k8gb_infoblox_heartbeat_errors_total"
	K8gbInfobloxRequestDuration       = "k8gb_infoblox_request_duration"
	K8gbInfobloxZoneUpdatesTotal      = "k8gb_infoblox_zone_updates_total"
	K8gbInfobloxZoneUpdateErrorsTotal = "k8gb_infoblox_zone_update_errors_total"
	K8gbEndpointStatusNum             = "k8gb_endpoint_status_num"
	K8gbRuntimeInfo                   = "k8gb_runtime_info"
)
View Source
const (
	CreateZoneDelegated DNSProviderRequest = "ZoneCreate"
	GetZoneDelegated    DNSProviderRequest = "ZoneRead"
	UpdateZoneDelegated DNSProviderRequest = "ZoneUpdate"
	DeleteZoneDelegated DNSProviderRequest = "ZoneDelete"

	CreateTXTRecord = "TXTRecordCreate"
	GetTXTRecord    = "TXTRecordRead"
	UpdateTXTRecord = "TXTRecordUpdate"
	DeleteTXTRecord = "TXTRecordDelete"
)
View Source
const (
	// DefaultMetricsNamespace provides the default namespace used, when PrometheusMetrics was not initialised
	DefaultMetricsNamespace = "k8gb_default"
)

Variables

This section is empty.

Functions

func Init

func Init(c *depresolver.Config)

Init always initialise PrometheusMetrics. The initialisation happens only once

Types

type DNSProviderRequest added in v0.8.8

type DNSProviderRequest string

DNSProviderRequest is a label for histogram metric

type MetricResult

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

MetricResult is primarily used by prometheus tests

func (*MetricResult) AsCounterVec

func (c *MetricResult) AsCounterVec() *prometheus.CounterVec

func (*MetricResult) AsGaugeVec

func (c *MetricResult) AsGaugeVec() *prometheus.GaugeVec

type PrometheusMetrics

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

func Metrics

func Metrics() *PrometheusMetrics

Metrics public static metrics, providing instance of initialised metrics

func (*PrometheusMetrics) Get

func (m *PrometheusMetrics) Get(name string) (r *MetricResult)

Get gets actual copy of metric defined by its name

func (*PrometheusMetrics) IncrementError

func (m *PrometheusMetrics) IncrementError(gslb *k8gbv1beta1.Gslb)

func (*PrometheusMetrics) IncrementReconciliation

func (m *PrometheusMetrics) IncrementReconciliation(gslb *k8gbv1beta1.Gslb)

func (*PrometheusMetrics) InfobloxIncrementHeartbeat

func (m *PrometheusMetrics) InfobloxIncrementHeartbeat(gslb *k8gbv1beta1.Gslb)

func (*PrometheusMetrics) InfobloxIncrementHeartbeatError

func (m *PrometheusMetrics) InfobloxIncrementHeartbeatError(gslb *k8gbv1beta1.Gslb)

func (*PrometheusMetrics) InfobloxIncrementZoneUpdate

func (m *PrometheusMetrics) InfobloxIncrementZoneUpdate(gslb *k8gbv1beta1.Gslb)

func (*PrometheusMetrics) InfobloxIncrementZoneUpdateError

func (m *PrometheusMetrics) InfobloxIncrementZoneUpdateError(gslb *k8gbv1beta1.Gslb)

func (*PrometheusMetrics) InfobloxObserveRequestDuration added in v0.8.8

func (m *PrometheusMetrics) InfobloxObserveRequestDuration(start time.Time, request DNSProviderRequest, success bool)

func (*PrometheusMetrics) Register

func (m *PrometheusMetrics) Register() (err error)

Register prometheus metrics. Read register documentation, but shortly: You can register metric with given name only once

func (*PrometheusMetrics) SetRuntimeInfo

func (m *PrometheusMetrics) SetRuntimeInfo(version, commit string)

func (*PrometheusMetrics) Unregister

func (m *PrometheusMetrics) Unregister()

Unregister prometheus metrics

func (*PrometheusMetrics) UpdateEndpointStatus

func (m *PrometheusMetrics) UpdateEndpointStatus(ep *externaldns.DNSEndpoint)

func (*PrometheusMetrics) UpdateFailoverStatus

func (m *PrometheusMetrics) UpdateFailoverStatus(gslb *k8gbv1beta1.Gslb, isPrimary bool, healthy k8gbv1beta1.HealthStatus, targets []string)

func (*PrometheusMetrics) UpdateGeoIPStatus

func (m *PrometheusMetrics) UpdateGeoIPStatus(gslb *k8gbv1beta1.Gslb, healthy k8gbv1beta1.HealthStatus, targets []string)

func (*PrometheusMetrics) UpdateHealthyRecordsMetric

func (m *PrometheusMetrics) UpdateHealthyRecordsMetric(gslb *k8gbv1beta1.Gslb, healthyRecords map[string][]string)

func (*PrometheusMetrics) UpdateIngressHostsPerStatusMetric

func (m *PrometheusMetrics) UpdateIngressHostsPerStatusMetric(gslb *k8gbv1beta1.Gslb, serviceHealth map[string]k8gbv1beta1.HealthStatus)

func (*PrometheusMetrics) UpdateRoundrobinStatus

func (m *PrometheusMetrics) UpdateRoundrobinStatus(gslb *k8gbv1beta1.Gslb, healthy k8gbv1beta1.HealthStatus, targets []string)

Jump to

Keyboard shortcuts

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