metrics

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Copyright 2021 The k8gb Contributors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Generated by GoLic, for more details see: https://github.com/AbsaOSS/golic

Copyright 2021 The k8gb Contributors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Generated by GoLic, for more details see: https://github.com/AbsaOSS/golic

Copyright 2021 The k8gb Contributors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Generated by GoLic, for more details see: https://github.com/AbsaOSS/golic

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"
	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 (
	// DefaultMetricsNamespace provides the default namespace used, when PrometheusMetrics was not initialised
	DefaultMetricsNamespace = "k8gb_default"
)

Variables

This section is empty.

Functions

func Init added in v0.8.2

func Init(c *depresolver.Config)

Init always initialise PrometheusMetrics. The initialisation happens only once

Types

type MetricResult added in v0.8.2

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

MetricResult is primarily used by prometheus tests

func (*MetricResult) AsCounterVec added in v0.8.2

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

func (*MetricResult) AsGaugeVec added in v0.8.2

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

type PrometheusMetrics

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

func Metrics added in v0.8.2

func Metrics() *PrometheusMetrics

Metrics public static metrics, providing instance of initialised metrics

func (*PrometheusMetrics) Get added in v0.8.2

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

Get gets actual copy of metric defined by it's name

func (*PrometheusMetrics) IncrementError added in v0.8.2

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

func (*PrometheusMetrics) IncrementReconciliation added in v0.8.2

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

func (*PrometheusMetrics) InfobloxIncrementHeartbeat added in v0.8.2

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

func (*PrometheusMetrics) InfobloxIncrementHeartbeatError added in v0.8.2

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

func (*PrometheusMetrics) InfobloxIncrementZoneUpdate added in v0.8.2

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

func (*PrometheusMetrics) InfobloxIncrementZoneUpdateError added in v0.8.2

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

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 added in v0.8.3

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

func (*PrometheusMetrics) Unregister

func (m *PrometheusMetrics) Unregister()

Unregister prometheus metrics

func (*PrometheusMetrics) UpdateEndpointStatus added in v0.8.3

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

func (*PrometheusMetrics) UpdateFailoverStatus added in v0.8.2

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

func (*PrometheusMetrics) UpdateGeoIPStatus added in v0.8.2

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 added in v0.8.2

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