Documentation ¶
Index ¶
- Constants
- func Init(c *depresolver.Config)
- type DNSProviderRequest
- type MetricResult
- type PrometheusMetrics
- func (m *PrometheusMetrics) Get(name string) (r *MetricResult)
- func (m *PrometheusMetrics) IncrementError(gslb *k8gbv1beta1.Gslb)
- func (m *PrometheusMetrics) IncrementReconciliation(gslb *k8gbv1beta1.Gslb)
- func (m *PrometheusMetrics) InfobloxIncrementHeartbeat(gslb *k8gbv1beta1.Gslb)
- func (m *PrometheusMetrics) InfobloxIncrementHeartbeatError(gslb *k8gbv1beta1.Gslb)
- func (m *PrometheusMetrics) InfobloxIncrementZoneUpdate(gslb *k8gbv1beta1.Gslb)
- func (m *PrometheusMetrics) InfobloxIncrementZoneUpdateError(gslb *k8gbv1beta1.Gslb)
- func (m *PrometheusMetrics) InfobloxObserveRequestDuration(start time.Time, request DNSProviderRequest, success bool)
- func (m *PrometheusMetrics) Register() (err error)
- func (m *PrometheusMetrics) SetRuntimeInfo(version, commit string)
- func (m *PrometheusMetrics) Unregister()
- func (m *PrometheusMetrics) UpdateEndpointStatus(ep *externaldns.DNSEndpoint)
- func (m *PrometheusMetrics) UpdateFailoverStatus(gslb *k8gbv1beta1.Gslb, isPrimary bool, healthy k8gbv1beta1.HealthStatus, ...)
- func (m *PrometheusMetrics) UpdateGeoIPStatus(gslb *k8gbv1beta1.Gslb, healthy k8gbv1beta1.HealthStatus, targets []string)
- func (m *PrometheusMetrics) UpdateHealthyRecordsMetric(gslb *k8gbv1beta1.Gslb, healthyRecords map[string][]string)
- func (m *PrometheusMetrics) UpdateIngressHostsPerStatusMetric(gslb *k8gbv1beta1.Gslb, serviceHealth map[string]k8gbv1beta1.HealthStatus)
- func (m *PrometheusMetrics) UpdateRoundrobinStatus(gslb *k8gbv1beta1.Gslb, healthy k8gbv1beta1.HealthStatus, targets []string)
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)
Click to show internal directories.
Click to hide internal directories.