当前位置:网站首页>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__=~".+"}'
边栏推荐
- 应用程序和matlab的通信方式
- Vite path alias @ configuration
- [flower carving experience] 15 try to build the Arduino development environment of beetle esp32 C3
- 强化实时数据管理,英方软件助力医保平台安全建设
- Numpy -- epidemic data analysis case
- Use of SVN
- Aerospace Hongtu information won the bid for the database system research and development project of a unit in Urumqi
- Three singleton modes of unity (hungry man, lazy man, monobehavior)
- AB package details in unity (super detail, features, packaging, loading, manager)
- Annexb and avcc are two methods of data segmentation in decoding
猜你喜欢

2022 the 4th China (Jinan) International Smart elderly care industry exhibition, Shandong old age Expo

10 schemes to ensure interface data security

Three. JS introductory learning notes 18: how to export JSON files with Blender

When opening the system window under UE4 shipping, the problem of crash is attached with the plug-in download address

Three. JS introductory learning notes 07: external model import -c4d to JSON file for web pages -fbx import

SPI master rx time out中断

L'application à l'échelle de la normalisation mature des produits ai des compagnies maritimes, cimc, leader mondial de l'intelligence artificielle portuaire et maritime / intelligence artificielle des

95.(cesium篇)cesium动态单体化-3D建筑物(楼栋)

Strengthen real-time data management, and the British software helps the security construction of the medical insurance platform

Leetcode-231-2的幂
随机推荐
Eye of depth (VI) -- inverse of matrix (attachment: some ideas of logistic model)
分步式監控平臺zabbix
统计学习方法——感知机
招标公告:2022年云南联通gbase数据库维保公开比选项目(第二次)比选公告
LeetCode2_ Add two numbers
C4D learning notes 2- animation - timeline and time function
Three singleton modes of unity (hungry man, lazy man, monobehavior)
【花雕体验】15 尝试搭建Beetle ESP32 C3之Arduino开发环境
Three. JS introductory learning notes 04: external model import - no material obj model
Good news! Kelan sundb database and Hongshu technology privacy data protection management software complete compatibility adaptation
When opening the system window under UE4 shipping, the problem of crash is attached with the plug-in download address
2022 the 4th China (Jinan) International Smart elderly care industry exhibition, Shandong old age Expo
VS2005 strange breakpoint is invalid or member variable value cannot be viewed
讲师征集令 | Apache SeaTunnel(Incubating) Meetup 分享嘉宾火热招募中!
Strengthen real-time data management, and the British software helps the security construction of the medical insurance platform
Numpy -- epidemic data analysis case
Leetcode-136-只出现一次的数(用异或来解答)
Unity drawing plug-in = = [support the update of the original atlas]
leetcode 241. Different Ways to Add Parentheses 为运算表达式设计优先级(中等)
LeetCode1_ Sum of two numbers