摘要:Prometheus serviceMonitorSelector ServiceMonitor(描述监控对象信息) matchLabels Service(k8s服务发现) Service+Deploy yaml定义 kind: Service apiVersion: v1 metadata: n
阅读全文
摘要:Counter:只增。 # 查找过去1分钟增长量 sum(increase(prometheus_http_request_count{}[1m])) Gauge:可增可减。 # 查找瞬时值 sum(prometheus_http_request_gauge{}) Histograms:样本落在桶中
阅读全文
摘要:// 在自定义注册表中只有需要的变量,没有默认的Go运行时指标和prometheus指标 registry := prometheus.NewRegistry() test:= prometheus.NewCounter(prometheus.CounterOpts{ Name: "test", H
阅读全文
摘要:在Prometheus中,一个metric可以有多个label,label由key和value组成。 import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prom
阅读全文