当前位置:网站首页>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__=~".+"}'
边栏推荐
猜你喜欢
喜讯!科蓝SUNDB数据库与鸿数科技隐私数据保护管理软件完成兼容性适配
MySQL数据库基本操作-DQL-基本查询
TiDB For PostgreSQL和YugabyteDB在Sysbench上的性能对比
Enterprise log analysis system elk
Xcode Revoke certificate
Talk about the cloud deployment of local projects created by SAP IRPA studio
What are compiled languages and interpreted languages?
Power of leetcode-231-2
torch.numel作用
Vs tool word highlight with margin
随机推荐
Is it reliable to open an account on Tongda letter with your mobile phone? Is there any potential safety hazard in such stock speculation
Strengthen real-time data management, and the British software helps the security construction of the medical insurance platform
How can laravel get the public path
2022 the 4th China (Jinan) International Smart elderly care industry exhibition, Shandong old age Expo
TCP framework___ Unity
How does geojson data merge the boundaries of regions?
laravel post提交数据时显示异常
A JS script can be directly put into the browser to perform operations
A link opens the applet code. After compilation, it is easy to understand
Markdown formula editing tutorial
强化实时数据管理,英方软件助力医保平台安全建设
Talk about the cloud deployment of local projects created by SAP IRPA studio
PyTorch 中的乘法:mul()、multiply()、matmul()、mm()、mv()、dot()
Step by step monitoring platform ZABBIX
U3D_ Infinite Bessel curve
asyncio 概念和用法
How does laravel run composer dump autoload without emptying the classmap mapping relationship?
01tire+链式前向星+dfs+贪心练习题.1
Unity的三种单例模式(饿汉,懒汉,MonoBehaviour)
航天宏图信息中标乌鲁木齐某单位数据库系统研发项目