Documentation ¶
Index ¶
- Variables
- func InitHubbleInternalMetrics(reg *prometheus.Registry, grpcMetrics *grpc_prometheus.ServerMetrics) error
- func InitMetricHandlers(reg *prometheus.Registry, enabled *api.Config) (*[]api.NamedHandler, error)
- func InitMetrics(reg *prometheus.Registry, enabled *api.Config, ...) error
- func InitMetricsServerHandler(srv *http.Server, reg *prometheus.Registry, enableOpenMetrics bool)
- func NewMetricConfigWatcher(configFilePath string, ...) *metricConfigWatcher
- func ProcessCiliumEndpointDeletion(pod *types.CiliumEndpoint) error
- func StartMetricsServer(srv *http.Server, log logrus.FieldLogger, ...) error
- type CiliumEndpointDeletionHandler
- type DynamicFlowProcessor
Constants ¶
This section is empty.
Variables ¶
var ( EnabledMetrics []api.NamedHandler Registry = prometheus.NewPedanticRegistry() )
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
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 InitHubbleInternalMetrics ¶
func InitHubbleInternalMetrics(reg *prometheus.Registry, grpcMetrics *grpc_prometheus.ServerMetrics) error
func InitMetricHandlers ¶
func InitMetricHandlers(reg *prometheus.Registry, enabled *api.Config) (*[]api.NamedHandler, error)
func InitMetrics ¶
func InitMetrics(reg *prometheus.Registry, enabled *api.Config, grpcMetrics *grpc_prometheus.ServerMetrics) error
InitMetrics initializes the metrics system
func InitMetricsServerHandler ¶
func InitMetricsServerHandler(srv *http.Server, reg *prometheus.Registry, enableOpenMetrics bool)
func NewMetricConfigWatcher ¶
func NewMetricConfigWatcher( configFilePath string, callback func(ctx context.Context, hash uint64, config api.Config), ) *metricConfigWatcher
NewmetricConfigWatcher creates a config watcher instance. Config watcher notifies DynamicFlowProcessor when config file changes and dynamic metric config should be reconciled.
func ProcessCiliumEndpointDeletion ¶ added in v1.15.7
func ProcessCiliumEndpointDeletion(pod *types.CiliumEndpoint) error
func StartMetricsServer ¶
func StartMetricsServer(srv *http.Server, log logrus.FieldLogger, metricsTLSConfig *certloader.WatchedServerConfig, grpcMetrics *grpc_prometheus.ServerMetrics) error
Types ¶
type CiliumEndpointDeletionHandler ¶ added in v1.15.7
type CiliumEndpointDeletionHandler struct {
// contains filtered or unexported fields
}
type DynamicFlowProcessor ¶
type DynamicFlowProcessor struct { Metrics []api.NamedHandler // contains filtered or unexported fields }
DynamicFlowProcessor represents instance of hubble exporter with dynamic configuration reload.
func NewDynamicFlowProcessor ¶
func NewDynamicFlowProcessor(reg *prometheus.Registry, logger logrus.FieldLogger, configFilePath string) *DynamicFlowProcessor
NewDynamicFlowProcessor creates instance of dynamic hubble flow exporter.
func (*DynamicFlowProcessor) OnDecodedFlow ¶
OnDecodedEvent distributes events across all managed exporters.
func (*DynamicFlowProcessor) Stop ¶
func (d *DynamicFlowProcessor) Stop() error
Stop stops configuration watcher and all deinitializes all metric handlers.