首页  

prometheus中的时间序列数据     所属分类 prometheus 浏览量 1131
Node Exporter
node_load1

Prometheus将所有采集到的样本数据以时间序列(time-series)的方式保存在内存数据库中,并且定时保存到硬盘上。
time-series 按照时间戳和值的序列顺序存放,称之为向量(vector). 
每条time-series通过指标名称(metrics name)和一组标签集(labelset)命名

在time-series中的每一个点称为一个样本(sample),样本由以下三部分组成:

指标(metric)    metric name和 labelsets
时间戳(timestamp)   精确到毫秒的时间戳
样本值(value)    folat64的浮点数


node_load1{instance="localhost:9100",job="node_exporter"}


指标(Metric)

$metricName{$labelName=$labelValue, ...}

以__作为前缀的标签,只能在系统内部使用。

标签(label) 样本 特征维度,通过维度数据进行过滤,聚合等。

__name__=$metricname

api_http_requests_total{method="POST", handler="/messages"}
{__name__="api_http_requests_total",method="POST", handler="/messages"}


指标(Metric)对应的数据结构

type Metric LabelSet
type LabelSet map[LabelName]LabelValue
type LabelName string
type LabelValue string

https://www.bookstack.cn/read/prometheus-book/promql-what-is-prometheus-metrics-and-labels.md

上一篇     下一篇
prometheus node-exporter 全部指标

期货与期权

特朗普语录

grafana数据接口

grafana 日PV 柱状图

prometheus 查询例子