0
点赞
收藏
分享

微信扫一扫

Prometheus 简介

概念

Prometheus 是一个开源的系统监控及性能告警系统
Prometheus 支持exporter 采集数据
Prometheus 支持pushgateway 进行数据上报

查看配置地址

https://prometheus.io/docs/prometheus/latest/configuration/configuration/

监控Kubernetes配置参考文件

https://github.com/prometheus/prometheus/tree/release-2.31/documentation/examples
https://github.com/prometheus/prometheus/blob/main/documentation/examples/prometheus-kubernetes.yml

采集数据

Prometheus 采集的数据都是时间序列数据
时间序列的每个点成为样本,每个样本有三个部分组成
    指标(metric): 指标的名称  + 描述当前样本特征的labelset
    时间戳(timestamp): 当前样本精确到毫秒时间
    样本值(value): 一个float 64 位的浮点型数据,表示当前样本的数值
样本的表达式
    <metric name>:{<label name>=<label value>,...}
    api_http_request_total:{method="POST",handler="/messages"}

metric type(指标类型)

counter: 统计的累积性指标(cumulative metric),仅能统计单向递增的增长数值

gauge:单一的数值指标(numerical value, arbitrarily go up and down)

histogram: 采样值累加sum 或 采样点次数累加count (multiple time series during a scrape)

summary: 对采样点进行统计,形成分位图;对采样点数值进行求和统计sum;对采样点次数统计


举报

相关推荐

0 条评论