Prometheus理论知识

1、Prometheus特性:

  • 基于时间序列模型:时间模型是一系列有序的数据,通常等时间间隔采样数据
  • 基于K/V的数据模型:键值对,速度快
  • 采样数据使用数学公式:完全基于数学运算而不是其他表达式,并提供查询的窗口
  • 采用HTTP pull/push两种对应数据的采集传输方式
  • 开源,且有大量的社区插件
  • 最精细的数据采样:prometheus理论上可以达到没1秒采集1次(采集间隔越短,采集数据量越大)

2、prometheus不足:

  • 目前不支持集群化
  • 偶发数据丢失(2.0之前版本)

3、prometheus的数据存储

  • prometheus采用时间序列的方式,以一种自定义格式存放在本地磁盘上。
  • prometheus的本地时间序列数据库以每小时为间隔来分存储,每一个又分为多个chunk文件,chunk文件就是用来存储,采集过来的数据,metadata和索引文件。
  • prometheus平时采集过来的数据,会先放到内存中,类似缓存的方式用于加快搜索和访问。
  • 当出现宕机时,prometheus有一个保护机制叫做WAL,可以将数据定时存放到磁盘中,并在重启时,用于恢复数据到内存中。

4、prometheus两种采集方式:

  • pull:主动拉取的形式
  • push:被动推送的形式

pull: 指被监控端安装已有的exporters插件,exporters只负责采集数据,而prometheus服务端主动拉取exporters采集的数据。

push:指被监控端主动推送数据到服务端,需要安装官方psuhgateway插件

相关推荐
Livia要学习1 天前
Prometheus架构解析
prometheus
云烟成雨TD2 天前
Micrometer 系列【63】统一观测:基于 Spring Boot 的生产级演示案例 | 基于 OTLP 集成 Prometheus + Jaeger
spring boot·云原生·prometheus
江南风月5 天前
如何使用WGCLOUD实现智能运维
运维·zabbix·运维开发·prometheus
凤山老林7 天前
可观测性落地:Spring Boot 3.x + Actuator + Prometheus + Grafana 监控体系搭建
spring boot·grafana·prometheus
企鹅郁金香9 天前
部署搭建 Prometheus 和 Grafana教程
eureka·grafana·prometheus
云边有个稻草人9 天前
Ubuntu部署Prometheus与Alertmanager:服务接入和远程监控
数据库·ubuntu·prometheus
雨辰AI11 天前
K8s 国产数据库慢 SQL 自动监控|Prometheus+Grafana 可视化全落地
数据库·sql·安全·容器·kubernetes·grafana·prometheus
lee_curry11 天前
RuoYi Cloud:Gateway、Auth、System 接入 Prometheus JVM 监控,并练习多副本、滚动升级和故障恢复
jvm·gateway·prometheus
晨陌y12 天前
redis_exporter + Prometheus监控Redis: 指标采集、告警与远程抓取
redis·bootstrap·prometheus
lee_curry16 天前
kube-prometheus-stack 87.21.0 部署
prometheus