metrics

package
v0.0.0-...-37a5cf9 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EdgeVisits = promauto.NewCounter(prometheus.CounterOpts{
		Name:      "external_visits_count",
		Namespace: namespace,
		Subsystem: subsystem,
		Help:      "Counts the number of requests by end-users that were initiated from a different website (i.e. where the request HTTP Referer header does not match the host in the HTTP Host header)",
	})

	EdgeBytes = promauto.NewCounter(prometheus.CounterOpts{
		Name:      "response_bytes_count",
		Namespace: namespace,
		Subsystem: subsystem,
		Help:      "Counts the amount of data transferred from Cloudflare to end users within a certain period of time. Total bandwidth equals the sum of all EdgeResponseBytes for a certain period of time",
	})

	EdgeBrowserMap = promauto.NewCounterVec(
		prometheus.CounterOpts{
			Name:      "browser_map_page_views_count",
			Namespace: namespace,
			Subsystem: subsystem,
			Help:      "Counts the successful requests for HTML",
		},
		[]string{"family"},
	)

	EdgeCountryMapRequests = promauto.NewCounterVec(
		prometheus.CounterOpts{
			Name:      "country_map_requests_count",
			Namespace: namespace,
			Subsystem: subsystem,
			Help:      "Counts the country from which request originated",
		},
		[]string{"country"},
	)

	EdgeCountryMapBytes = promauto.NewCounterVec(
		prometheus.CounterOpts{
			Name:      "country_map_bytes_count",
			Namespace: namespace,
			Subsystem: subsystem,
			Help:      "Count of bytes returned to client per country",
		},
		[]string{"country"},
	)

	EdgeCountryMapThreats = promauto.NewCounterVec(
		prometheus.CounterOpts{
			Name:      "country_map_threats_count",
			Namespace: namespace,
			Subsystem: subsystem,
			Help:      "Counts requests classified as threats per country",
		},
		[]string{"country"},
	)

	EdgeResponseStatus = promauto.NewCounterVec(
		prometheus.CounterOpts{
			Name:      "response_status_count",
			Namespace: namespace,
			Subsystem: subsystem,
			Help:      "Counts HTTP response status code returned to client",
		},
		[]string{"status"},
	)

	PoolHealthStatus = promauto.NewGaugeVec(
		prometheus.GaugeOpts{
			Name:      "pool_health_status",
			Namespace: namespace,
			Subsystem: subsystem,
			Help:      "Reports the health of a pool, 1 for healthy, 0 for unhealthy.",
		},
		[]string{"colo_code", "load_balancer_name", "origin_name", "steering_policy", "pool_name", "region"},
	)
)

define custom metrics https://pkg.go.dev/github.com/prometheus/client_golang@v1.10.0/prometheus#GaugeVec

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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