monitor

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// UNKNOWN 未知
	UNKNOWN = "unknown"
)

Variables

This section is empty.

Functions

func NewCounterVec

func NewCounterVec(namespace, subsystem, name, help string, lables []string) (vec *prometheus.CounterVec)

NewCounterVec 用于跟踪累计值,如某事件次数

func NewGaugeVec

func NewGaugeVec(namespace, subsystem, name, help string, lables []string) (vec *prometheus.GaugeVec)

NewGaugeVec 用于数值变化,如内存变化

func NewHistogramVec

func NewHistogramVec(namespace, subsystem, name, help string, lables []string, buckets []float64) (vec *prometheus.HistogramVec)

NewHistogramVec 用于柱状图,用于跟踪请求耗时,响应大小,服务器端统计区间

func NewSummaryVec

func NewSummaryVec(namespace, subsystem, name, help string, lables []string) (vec *prometheus.SummaryVec)

NewSummaryVec 用于柱状图,用于跟踪请求耗时,响应大小,服务器端统计区间

Types

type CountLabels

type CountLabels struct {
	Status string // ok/failed/block/NonBlock
	Action string
	sync.Once
	// contains filtered or unexported fields
}

CountLabels prometheus Database 类型 label

type CountVec

type CountVec struct {
	// contains filtered or unexported fields
}

CountVec prometheus vec

func NewCountVec

func NewCountVec(namespace, subsystem, name string) *CountVec

NewCountVec prometheus Database vec

func (*CountVec) Inc

func (kv *CountVec) Inc(labels *CountLabels)

Inc inc label

type DatabaseLabels

type DatabaseLabels struct {
	Table  string
	Status string // ok/failed/block/NonBlock
	Action string
	sync.Once
	Label prometheus.Labels
}

DatabaseLabels prometheus Database 类型 label

type DatabaseVec

type DatabaseVec struct {
	// contains filtered or unexported fields
}

DatabaseVec prometheus vec

func NewDatabaseVec

func NewDatabaseVec(namespace, subsystem, name string) *DatabaseVec

NewDatabaseVec prometheus Database vec

func (*DatabaseVec) Inc

func (kv *DatabaseVec) Inc(labels *DatabaseLabels)

Inc inc label

type GaugeLabels

type GaugeLabels struct {
	Db       string
	Table    string
	Category string
	sync.Once
	// contains filtered or unexported fields
}

GaugeLabels prometheus Database 类型 label

type GaugeVec

type GaugeVec struct {
	// contains filtered or unexported fields
}

GaugeVec prometheus vec

func NewGaugerVec

func NewGaugerVec(namespace, subsystem, name string, labels ...string) *GaugeVec

NewGaugerVec prometheus Database vec

func (*GaugeVec) Set

func (kv *GaugeVec) Set(labels *GaugeLabels, value int)

Set inc label

type KafkaLabels

type KafkaLabels struct {
	Partition     int32
	Topic, Status string
	sync.Once
	Label prometheus.Labels
}

KafkaLabels prometheus Kafka 类型 label

type KafkaVec

type KafkaVec struct {
	// contains filtered or unexported fields
}

KafkaVec prometheus vec

func NewKafkaVec

func NewKafkaVec(namespace, subsystem, name string) *KafkaVec

NewKafkaVec prometheus kafka vec

func (*KafkaVec) Inc

func (kv *KafkaVec) Inc(labels *KafkaLabels)

Inc inc label

type UnmarshalLabels

type UnmarshalLabels struct {
	Category string
	Status   string // ok/failed/block/NonBlock
	sync.Once
	Label prometheus.Labels
}

UnmarshalLabels prometheus Unmarshal 类型 label

type UnmarshalVec

type UnmarshalVec struct {
	// contains filtered or unexported fields
}

UnmarshalVec prometheus vec

func NewUnmarshalVec

func NewUnmarshalVec(namespace, subsystem, name string) *UnmarshalVec

NewUnmarshalVec prometheus Unmarshal vec

func (*UnmarshalVec) Inc

func (kv *UnmarshalVec) Inc(labels *UnmarshalLabels)

Inc inc label

Jump to

Keyboard shortcuts

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