当前位置:网站首页>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__=~".+"}'
边栏推荐
- Three. JS introductory learning notes 10:three JS grid
- Webcodecs parameter settings -avc1.42e01e meaning
- 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
- ./ Functions of configure, make and make install
- 2022山东智慧养老展,适老穿戴设备展,养老展,山东老博会
- Bidding announcement: Panjin people's Hospital Panjin hospital database maintenance project
- 95.(cesium篇)cesium动态单体化-3D建筑物(楼栋)
- Simple understanding and application of TS generics
- A wave of open source notebooks is coming
猜你喜欢
Dotween -- ease function
torch.numel作用
Async and await
持续创作,还得靠它!
A wave of open source notebooks is coming
Application example of infinite list [uigridview]
Three. JS introductory learning notes 19: how to import FBX static model
Shandong old age Expo, 2022 China smart elderly care exhibition, smart elderly care and aging technology exhibition
C4D learning notes 1- animation - animation key frames
Excessive dependence on subsidies, difficult collection of key customers, and how strong is the potential to reach the dream of "the first share of domestic databases"?
随机推荐
VS2005 strange breakpoint is invalid or member variable value cannot be viewed
Cut ffmpeg as needed, and use emscripten to compile and run
Eye of depth (VII) -- Elementary Transformation of matrix (attachment: explanation of some mathematical models)
Communication mode between application program and MATLAB
Sysom case analysis: where is the missing memory| Dragon lizard Technology
企业级日志分析系统ELK
航运船公司人工智能AI产品成熟化标准化规模应用,全球港航人工智能/集装箱人工智能领军者CIMC中集飞瞳,打造国际航运智能化标杆
TiDB For PostgreSQL和YugabyteDB在Sysbench上的性能对比
Mysql database basic operation DQL basic query
Three. JS introductory learning notes 15: threejs frame animation module
JS array foreach source code parsing
Three. JS introductory learning notes 11:three JS group composite object
Please supervise the 2022 plan
Three. JS introductory learning notes 07: external model import -c4d to JSON file for web pages -fbx import
Plate - forme de surveillance par étapes zabbix
C4D learning notes 2- animation - timeline and time function
分步式監控平臺zabbix
如何在shell中实现 backspace
Shader basic UV operations, translation, rotation, scaling
Virtual memory, physical memory /ram what