prometheus 作业中 static_config 中的正则表达式

问题描述 投票:0回答:1

我有这样的普罗米修斯工作:

- job_name: blackbox-http
  metrics_path: /probe
  params:
    module: [http_2xx]
  static_configs:
    - targets:
      - http://prometheus.io
      - https://prometheus.io
      - http://example.com:8080
  relabel_configs:
    - source_labels: [__address__]
      target_label: __param_target
    - source_labels: [__param_target]
      target_label: instance
    - target_label: __address__
      replacement: localhost:9115

现在我的问题是我可以在

targets
部分的
static_conifgs
中使用正则表达式吗? 例如这样的事情:

- job_name: blackbox-http
  metrics_path: /probe
  params:
    module: [http_2xx]
  static_configs:
    - targets:
      - http[s]?://prometheus.io
      - http://example.com:8080/*?
  relabel_configs:
    - source_labels: [__address__]
      target_label: __param_target
    - source_labels: [__param_target]
      target_label: instance
    - target_label: __address__
      replacement: localhost:9115
configuration config prometheus prometheus-blackbox-exporter
1个回答
0
投票

我有同样的问题。有什么进展吗?

© www.soinside.com 2019 - 2024. All rights reserved.