当前位置:网站首页>Prometheus API deletes all data of a specified job
Prometheus API deletes all data of a specified job
2022-07-07 16:23:00 【shy_ snow】
modify job Of name Later, I found that the data was repeated , Don't want to delete all the data , Just want to delete one of them job Previous data , I saw it on the Internet api You can delete .
First , To pass the prometheus Launch parameters –web.enable-admin-api To open admin HTTP API The interview of .
# stop it prometheus
ps -ef |grep -v grep | grep prometheus.yml | awk '{print $2}' | xargs kill
# increase --web.enable-admin-api Post start 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 &
Then you can choose the appropriate way to delete the data :
# Delete all time series indicators that match a tag
curl -X POST -g 'http://localhost:9090/api/v1/admin/tsdb/delete_series?match[]={kubernetes_name="redis"}'
# Delete job Task or instance Data indicators of :
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 Delete all data in , You can use the following command :
curl -X POST -g 'http://localhost:9090/api/v1/admin/tsdb/delete_series?match[]={__name__=~".+"}'
边栏推荐
猜你喜欢
无法将“pip”项识别为 cmdlet、函数、脚本文件或可运行程序的名称
过度依赖补助,大客户收款难,冲刺“国产数据库第一股”的达梦后劲有多足?
MySQL数据库基本操作-DQL-基本查询
【花雕体验】15 尝试搭建Beetle ESP32 C3之Arduino开发环境
SPI master rx time out中断
深度之眼(七)——矩阵的初等变换(附:数模一些模型的解释)
Xingruige database was shortlisted as the "typical solution for information technology application and innovation in Fujian Province in 2021"
Leetcode-231-2的幂
记一次项目的迁移过程
PyTorch 中的乘法:mul()、multiply()、matmul()、mm()、mv()、dot()
随机推荐
【知识小结】PHP使用svn笔记总结
Numpy -- epidemic data analysis case
How does geojson data merge the boundaries of regions?
Xingruige database was shortlisted as the "typical solution for information technology application and innovation in Fujian Province in 2021"
js中复选框checkbox如何判定为被选中
SPI master rx time out中断
Is it reliable to open an account on Tongda letter with your mobile phone? Is there any potential safety hazard in such stock speculation
无法将“pip”项识别为 cmdlet、函数、脚本文件或可运行程序的名称
Strengthen real-time data management, and the British software helps the security construction of the medical insurance platform
121. The best time to buy and sell stocks
2022山东智慧养老展,适老穿戴设备展,养老展,山东老博会
A JS script can be directly put into the browser to perform operations
How does laravel run composer dump autoload without emptying the classmap mapping relationship?
[hcsd celebrity live broadcast] teach the interview tips of big companies in person - brief notes
AE learning 01: AE complete project summary
星瑞格数据库入围“2021年度福建省信息技术应用创新典型解决方案”
laravel中将session由文件保存改为数据库保存
torch. Numel action
Shandong old age Expo, 2022 China smart elderly care exhibition, smart elderly care and aging technology exhibition
Leetcode-136- number that appears only once (solve with XOR)