当前位置:网站首页>prometheus api删除某个指定job的所有数据
prometheus api删除某个指定job的所有数据
2022-07-07 14:03:00 【shy_snow】
修改job的name后发现数据重复了,不想删除所有的数据,只想删除其中一个job之前的数据,从网上看到有api可以删除。
首先,要通过prometheus启动参数–web.enable-admin-api 来开启admin HTTP API的访问。
#停止prometheus
ps -ef |grep -v grep | grep prometheus.yml | awk '{print $2}' | xargs kill
#增加--web.enable-admin-api后启动prometheus
nohup /home/xxx/prometheus-2.25.2.linux-amd64/prometheus --config.file=prometheus.yml --web.enable-admin-api --web.enable-lifecycle > nohup.out 2>&1 &
然后就可以选择合适方式来删除数据:
#删除与某个标签匹配的所有时间序列指标
curl -X POST -g 'http://localhost:9090/api/v1/admin/tsdb/delete_series?match[]={kubernetes_name="redis"}'
#删除 job 任务或者 instance 的数据指标:
curl -X POST -g 'http://localhost:9090/api/v1/admin/tsdb/delete_series?match[]={job="youjobname"}'
curl -X POST -g 'http://localhost:9090/api/v1/admin/tsdb/delete_series?match[]={instance="192.168.129.110:9090"}'
#Prometheus 中删除所有的数据,可以使用如下命令:
curl -X POST -g 'http://localhost:9090/api/v1/admin/tsdb/delete_series?match[]={__name__=~".+"}'
边栏推荐
- Virtual memory, physical memory /ram what
- 尤雨溪,来了!
- Eye of depth (VII) -- Elementary Transformation of matrix (attachment: explanation of some mathematical models)
- A wave of open source notebooks is coming
- UE4 exports the picture + text combination diagram through ucanvasrendertarget2d
- 分类模型评价标准(performance measure)
- JS array foreach source code parsing
- Function: JS Click to copy content function
- Introduction to pyGame games
- [flower carving experience] 15 try to build the Arduino development environment of beetle esp32 C3
猜你喜欢
Enterprise log analysis system elk
Whole process analysis of unity3d rendering pipeline
Mysql database basic operation DQL basic query
Xcode Revoke certificate
Virtual memory, physical memory /ram what
Asynchronous application of generator function
torch. Numel action
Use of SVN
How does geojson data merge the boundaries of regions?
SPI master RX time out interrupt
随机推荐
Virtual memory, physical memory /ram what
js中复选框checkbox如何判定为被选中
TiDB For PostgreSQL和YugabyteDB在Sysbench上的性能对比
Leetcode-231-2的幂
U3D_ Infinite Bessel curve
TCP framework___ Unity
航運船公司人工智能AI產品成熟化標准化規模應用,全球港航人工智能/集裝箱人工智能領軍者CIMC中集飛瞳,打造國際航運智能化標杆
Postman generate timestamp, future timestamp
C4D learning notes 3- animation - animation rendering process case
Continuous creation depends on it!
招标公告:福建省农村信用社联合社数据库审计系统采购项目(重新招标)
2022 the 4th China (Jinan) International Smart elderly care industry exhibition, Shandong old age Expo
深度之眼(六)——矩阵的逆(附:logistic模型一些想法)
asyncio 概念和用法
融云斩获 2022 中国信创数字化办公门户卓越产品奖!
Three. Introduction to JS learning notes 17: mouse control of 3D model rotation of JSON file
星瑞格数据库入围“2021年度福建省信息技术应用创新典型解决方案”
强化实时数据管理,英方软件助力医保平台安全建设
The "go to definition" in VS2010 does not respond or prompts the solution of "symbol not found"
C4D learning notes 1- animation - animation key frames