Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( HttpCostHistogram = prometheus.NewHistogram(prometheus.HistogramOpts{ Name: "otp_server_http_cost_histogram", Help: "otp server http cost histogram(http请求耗时分布,单位:毫秒)", Buckets: []float64{10, 100, 300, 500, 1000, 3000, 10000}, }) HttpRespCodeHistogram = prometheus.NewHistogram(prometheus.HistogramOpts{ Name: "otp_server_http_response_code_histogram", Help: "otp server http response status code histogram(http响应状态码)", Buckets: []float64{299, 499, 599}, }) )
计算QPS: irate(otp_server_http_req_total{job="otpserver"}[1m]) 统计4xx占比: sum(rate(otp_server_http_response_code_histogram_bucket{le="499"}[5m])) - sum(rate(otp_server_http_response_code_histogram_bucket{le="299"}[5m])) 查询所有otp server指标: {__name__=~"^otp_server.*"}
Functions ¶
func HttpRepsCode ¶
func HttpRepsCode(code int)
func InitPrometheusMonitor ¶
func StoreStatusNotEnabled ¶
func StoreStatusNotEnabled(storeType string)
StoreStatusNotEnabled store未启用
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.