cert-manager: github.com/jetstack/cert-manager/pkg/metrics Index | Files

package metrics

import "github.com/jetstack/cert-manager/pkg/metrics"

Package metrics contains global structures related to metrics collection cert-manager exposes the following metrics: certificate_expiration_timestamp_seconds{name, namespace} certificate_ready_status{name, namespace, condition} acme_client_request_count{"scheme", "host", "path", "method", "status"} acme_client_request_duration_seconds{"scheme", "host", "path", "method", "status"} controller_sync_call_count{"controller"}

Package metrics contains global structures related to metrics collection cert-manager exposes the following metrics: certificate_expiration_timestamp_seconds{name, namespace} certificate_ready_status{name, namespace, condition} acme_client_request_count{"scheme", "host", "path", "method", "status"} acme_client_request_duration_seconds{"scheme", "host", "path", "method", "status"} controller_sync_call_count{"controller"}

Package metrics contains global structures related to metrics collection cert-manager exposes the following metrics: certificate_expiration_timestamp_seconds{name, namespace} certificate_ready_status{name, namespace, condition} acme_client_request_count{"scheme", "host", "path", "method", "status"} acme_client_request_duration_seconds{"scheme", "host", "path", "method", "status"} controller_sync_call_count{"controller"}

Index

Package Files

acme.go certificates.go metrics.go

type Metrics Uses

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

Metrics is designed to be a shared object for updating the metrics exposed by cert-manager

func New Uses

func New(log logr.Logger) *Metrics

func (*Metrics) IncrementACMERequestCount Uses

func (m *Metrics) IncrementACMERequestCount(labels ...string)

IncrementACMERequestCount increases the acme client request counter.

func (*Metrics) IncrementSyncCallCount Uses

func (m *Metrics) IncrementSyncCallCount(controllerName string)

IncrementSyncCallCount will increase the sync counter for that controller.

func (*Metrics) ObserveACMERequestDuration Uses

func (m *Metrics) ObserveACMERequestDuration(duration time.Duration, labels ...string)

ObserveACMERequestDuration increases bucket counters for that ACME client duration.

func (*Metrics) RemoveCertificate Uses

func (m *Metrics) RemoveCertificate(key string)

RemoveCertificate will delete the Certificate metrics from continuing to be exposed.

func (*Metrics) Shutdown Uses

func (m *Metrics) Shutdown(server *http.Server)

func (*Metrics) Start Uses

func (m *Metrics) Start(listenAddress string) (*http.Server, error)

Start will register the Prometheu metrics, and start the Prometheus server

func (*Metrics) UpdateCertificate Uses

func (m *Metrics) UpdateCertificate(ctx context.Context, crt *cmapi.Certificate)

UpdateCertificate will update that Certificate metric with expiry and Ready condition.

Package metrics imports 12 packages (graph) and is imported by 24 packages. Updated 2020-08-12. Refresh now. Tools for package owners.