metric

package
v1.8.4 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 2 Imported by: 6

Documentation

Index

Constants

View Source
const (
	// ENIIPAllocActionSucceed represents a succeeded ip alloc request
	ENIIPAllocActionSucceed = "succeed"
	// ENIIPAllocActionFail represents a failed ip alloc request
	ENIIPAllocActionFail = "fail"
)
View Source
const (
	ResourcePoolTypeLocal  string = "LocalIP"
	ResourcePoolTypeRemote string = "RemoteIP"
)

Variables

View Source
var (
	// OpenAPILatency aliyun open api latency
	OpenAPILatency = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Name:    "aliyun_openapi_latency",
			Help:    "aliyun openapi latency in ms",
			Buckets: []float64{50, 100, 200, 400, 800, 1600, 3200, 6400, 12800, 13800, 14800, 16800, 20800, 28800, 44800},
		},
		[]string{"api", "error"},
	)
	// MetadataLatency aliyun metadata latency
	MetadataLatency = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Name:    "aliyun_metadata_latency",
			Help:    "aliyun metadata latency in ms",
			Buckets: prometheus.ExponentialBuckets(1, 2, 10),
		},
		[]string{"url", "error"},
	)
)
View Source
var (
	// ENIIPFactoryENICount amount of allocated terway multi-ip factory eni
	ENIIPFactoryENICount = prometheus.NewGaugeVec(
		prometheus.GaugeOpts{
			Name: "terway_eniip_factory_eni_count",
			Help: "amount of allocated terway multi-ip factory eni",
		},
		[]string{"name", "max_eni"},
	)

	// ENIIPFactoryIPCount amount of allocated terway multi-ip secondary ip
	ENIIPFactoryIPCount = prometheus.NewGaugeVec(
		prometheus.GaugeOpts{
			Name: "terway_eniip_factory_ip_count",
			Help: "amount of allocated terway multi-ip secondary ip",
		},

		[]string{"name", "eni", "max_ip"},
	)

	// ENIIPFactoryIPAllocCount counter of eniip factory ip allocation
	ENIIPFactoryIPAllocCount = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "terway_eniip_factory_ip_alloc_count",
			Help: "counter of eniip factory ip allocation",
		},

		[]string{"eni", "status"},
	)
)
View Source
var (
	// ResourcePoolTotal terway total source amount in the pool
	ResourcePoolTotal = prometheus.NewGaugeVec(
		prometheus.GaugeOpts{
			Name: "terway_resource_pool_total_count",
			Help: "terway total resources amount in the pool",
		},

		[]string{"type", "ipStack"},
	)

	// ResourcePoolIdle terway amount of idle resource in the pool
	ResourcePoolIdle = prometheus.NewGaugeVec(
		prometheus.GaugeOpts{
			Name: "terway_resource_pool_idle_count",
			Help: "terway amount of idle resources in the pool",
		},
		[]string{"type", "ipStack"},
	)

	// ResourcePoolDisposed terway resource count of begin disposed
	ResourcePoolDisposed = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "terway_resource_pool_disposed_count",
			Help: "terway resource count of being disposed",
		},
		[]string{"type", "ipStack"},
	)

	// ResourcePoolAllocatedCount terway resource allocation count
	ResourcePoolAllocated = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "terway_resource_pool_allocated_count",
			Help: "terway resource allocation count",
		},
		[]string{"type"},
	)
)
View Source
var (
	// RPCLatency terway grpc latency for grpc by cni binary
	RPCLatency = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Name:    "terway_rpc_latency",
			Help:    "terway rpc latency in ms",
			Buckets: []float64{50, 100, 200, 400, 800, 1600, 3200, 6400, 12800, 25600, 26600, 27600, 29600, 33600, 41600, 57600, 89600, 110000, 120000},
		},
		[]string{"rpc_api", "error"},
	)
)

Functions

func MsSince

func MsSince(start time.Time) float64

MsSince returns milliseconds since start.

Types

This section is empty.

Jump to

Keyboard shortcuts

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