【问题标题】:How to delete series that meet multiple conditions at the same time in prometheus?prometheus如何删除同时满足多个条件的series?
【发布时间】:2023-02-07 05:51:52
【问题描述】:

以下查询适用于instances=127.0.0.1:9090 的所有人:

curl -X POST -g 'http://127.0.0.1:9090/api/v1/admin/tsdb/delete_series?match[]={instance="127.0.0.1:9090"}'

以下查询适用于job=node 的所有人:

curl -X POST -g 'http://127.0.0.1:9090/api/v1/admin/tsdb/delete_series?&match[]={job="node"}'

如果我只想删除instance=127.0.0.1:9090job=node的系列,我该如何查询呢?

【问题讨论】:

    标签: prometheus promql


    【解决方案1】:

    使用以下查询:

    curl -X POST -g 'http://127.0.0.1:9090/api/v1/admin/tsdb/delete_series?match[]={instance="127.0.0.1:9090", job="node"}'
    

    【讨论】:

      猜你喜欢
      • 2021-12-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-06-06
      • 2021-10-12
      • 1970-01-01
      • 1970-01-01
      • 2014-04-30
      相关资源
      最近更新 更多