prometheus

package
v0.0.0-...-442c461 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: Apache-2.0, Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ClientAPIRequestsCounter = prometheus.NewCounterVec(
	prometheus.CounterOpts{
		Name: "bigip_http_client_api_requests_total",
		Help: "A counter for requests from the wrapped http client.",
	},
	[]string{"code", "method"},
)
View Source
var ClientDNSLatencyVec = prometheus.NewHistogramVec(
	prometheus.HistogramOpts{
		Name:    "bigip_http_client_dns_duration_seconds",
		Help:    "Trace dns latency histogram.",
		Buckets: []float64{.005, .01, .025, .05},
	},
	[]string{"event"},
)
View Source
var ClientHistVec = prometheus.NewHistogramVec(
	prometheus.HistogramOpts{
		Name:    "bigip_http_client_request_duration_seconds",
		Help:    "Trace http request latencies histogram.",
		Buckets: prometheus.DefBuckets,
	},
	[]string{},
)
View Source
var ClientInFlightGauge = prometheus.NewGauge(prometheus.GaugeOpts{
	Name: "bigip_http_client_in_flight_requests",
	Help: "Total count of in-flight requests for the wrapped http client.",
})
View Source
var ClientTLSLatencyVec = prometheus.NewHistogramVec(
	prometheus.HistogramOpts{
		Name:    "bigip_http_client_tls_duration_seconds",
		Help:    "Trace tls latency histogram.",
		Buckets: []float64{.05, .1, .25, .5},
	},
	[]string{"event"},
)
View Source
var ClientTrace = &promhttp.InstrumentTrace{
	DNSStart: func(t float64) {
		ClientDNSLatencyVec.WithLabelValues("dns_start").Observe(t)
	},
	DNSDone: func(t float64) {
		ClientDNSLatencyVec.WithLabelValues("dns_done").Observe(t)
	},
	TLSHandshakeStart: func(t float64) {
		ClientTLSLatencyVec.WithLabelValues("tls_handshake_start").Observe(t)
	},
	TLSHandshakeDone: func(t float64) {
		ClientTLSLatencyVec.WithLabelValues("tls_handshake_done").Observe(t)
	},
}
View Source
var CurrentErrors = prometheus.NewGaugeVec(
	prometheus.GaugeOpts{
		Name: "bigip_current_errors",
		Help: "Total count of errors occured parsing the configuration.",
	},
	[]string{},
)
View Source
var MonitoredNodes = prometheus.NewGaugeVec(
	prometheus.GaugeOpts{
		Name: "bigip_monitored_nodes",
		Help: "Total count of monitored nodes by the BigIP k8s CTLR.",
	},
	[]string{"nodeselector"},
)

TODO use as Counter not Gauge

View Source
var MonitoredServices = prometheus.NewGaugeVec(
	prometheus.GaugeOpts{
		Name: "bigip_monitored_services",
		Help: "Total count of monitored services by the BigIP k8s CTLR.",
	},
	[]string{"namespace", "name", "status"},
)

Functions

func RegisterMetrics

func RegisterMetrics(httpClientMetrics bool)

further metrics? todo think about RegisterMetrics registers all Prometheus metrics defined above

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL