采集到的样本以时间序列的方式保存在内存(TSDB 时序数据库)中,并定时保存到硬盘中

prometheus一般会保留15天

 

prometheus按照block块的方式来存储数据,每2小时为一个时间单位,首先会存储到内存中,当到达2小时后,会自动写入磁盘中。block的目录结构如下:

prometheus-存储

 

 

prometheus-存储

 

 

chunks               多个,是个目录、保存timeseries数据
meta.json           配置文件,包含起止时间、包含哪些block
index                通过metric名和labels查找时序数据在chunk文件中的位置
tombstones       删除操作会首先记录到这个文件

 

相关文章:

  • 2022-12-23
  • 2021-08-04
  • 2021-09-30
  • 2022-12-23
  • 2022-12-23
  • 2021-09-13
  • 2021-04-16
猜你喜欢
  • 2022-12-23
  • 2021-12-30
  • 2022-12-23
  • 2022-02-24
  • 2021-12-16
  • 2021-06-01
  • 2022-02-25
相关资源
相似解决方案