Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( RequestsTotal = prometheus.NewCounterVec(prometheus.CounterOpts{ Namespace: api.DefaultPrometheusNamespace, Name: "metrics_http_handler_requests_total", Help: "A counter for requests to Hubble metrics handler.", }, []string{"code"}) RequestDuration = prometheus.NewHistogramVec(prometheus.HistogramOpts{ Namespace: api.DefaultPrometheusNamespace, Name: "metrics_http_handler_request_duration_seconds", Help: "A histogram of latencies of Hubble metrics handler.", }, []string{"code"}) )
Metrics related to Hubble metrics HTTP requests handling
View Source
var ( LostEvents = prometheus.NewCounterVec(prometheus.CounterOpts{ Namespace: api.DefaultPrometheusNamespace, Name: "lost_events_total", Help: "Number of lost events", }, []string{labelSource}) )
Additional metrics - they're not counting flows, so are not served via Hubble metrics API, but belong to the same Prometheus namespace.
Functions ¶
func EnableMetrics ¶
func EnableMetrics(log logrus.FieldLogger, metricsServer string, metricsTLSConfig *certloader.WatchedServerConfig, m []string, grpcMetrics *grpc_prometheus.ServerMetrics, enableOpenMetrics bool) error
EnableMetrics starts the metrics server with a given list of metrics. This is the function Cilium uses to configure Hubble metrics in embedded mode.
func ProcessFlow ¶
ProcessFlow processes a flow and updates metrics
func ProcessPodDeletion ¶
func ProcessPodDeletion(pod *slim_corev1.Pod) error
func Register ¶ added in v1.15.0
func Register(cs ...prometheus.Collector)
Register registers additional metrics collectors within hubble metrics registry.
Types ¶
type PodDeletionHandler ¶
type PodDeletionHandler struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.