Prometheus 如何解决普罗米修斯黑匣子错误

Prometheus 如何解决普罗米修斯黑匣子错误,prometheus,prometheus-blackbox-exporter,Prometheus,Prometheus Blackbox Exporter,我想在blackbox\u导出器中使用“fail\u if\u body\u not\u matches\u regexp”来检测HTTP接口中是否返回了字符串(该接口是GET类型的url),但blackbox\u导出器页面的结果始终是401。顺便说一下,我通常可以通过浏览器访问此界面并获得结果 我想为split brain检测rabbitMQ,但rabbitMQ\u exporter无法检测split brain。因此,我在blackbox\u exporter中使用HTTP probe来进行

我想在blackbox\u导出器中使用“fail\u if\u body\u not\u matches\u regexp”来检测HTTP接口中是否返回了字符串(该接口是GET类型的url),但blackbox\u导出器页面的结果始终是401。顺便说一下,我通常可以通过浏览器访问此界面并获得结果

我想为split brain检测rabbitMQ,但rabbitMQ\u exporter无法检测split brain。因此,我在blackbox\u exporter中使用HTTP probe来进行regexp匹配接口的结果。但当我配置完所有操作后。我访问 url“”和黑盒始终显示401,如下所示

# HELP probe_dns_lookup_time_seconds Returns the time taken for probe dns lookup in seconds
# TYPE probe_dns_lookup_time_seconds gauge
probe_dns_lookup_time_seconds 3.6954e-05
# HELP probe_duration_seconds Returns how long the probe took to complete in seconds
# TYPE probe_duration_seconds gauge
probe_duration_seconds 0.002106961
# HELP probe_failed_due_to_regex Indicates if probe failed due to regex
# TYPE probe_failed_due_to_regex gauge
probe_failed_due_to_regex 1
# HELP probe_http_content_length Length of http content response
# TYPE probe_http_content_length gauge
probe_http_content_length 54
# HELP probe_http_duration_seconds Duration of http request by phase, summed over all redirects
# TYPE probe_http_duration_seconds gauge
probe_http_duration_seconds{phase="connect"} 0.000388833
probe_http_duration_seconds{phase="processing"} 0.001160027
probe_http_duration_seconds{phase="resolve"} 3.6954e-05
probe_http_duration_seconds{phase="tls"} 0
probe_http_duration_seconds{phase="transfer"} 0.000159596
# HELP probe_http_redirects The number of redirects
# TYPE probe_http_redirects gauge
probe_http_redirects 0
# HELP probe_http_ssl Indicates if SSL was used for the final redirect
# TYPE probe_http_ssl gauge
probe_http_ssl 0
# HELP probe_http_status_code Response HTTP status code
# TYPE probe_http_status_code gauge
probe_http_status_code 401
# HELP probe_http_version Returns the version of HTTP of the probe response
# TYPE probe_http_version gauge
probe_http_version 1.1
# HELP probe_ip_protocol Specifies whether probe ip protocol is IP4 or IP6
# TYPE probe_ip_protocol gauge
probe_ip_protocol 4
# HELP probe_success Displays whether or not the probe was a success
# TYPE probe_success gauge
probe_success 0
My prometheus config.yaml:

  - job_name: 'rabbitma_brainSplit'
    metrics_path: /probe
    basic_auth:
      username: admin
      password: GSS1duS1Zdda
    params:
      module: [http_2rabbitmq_brainSplit]  
    static_configs:
      - targets:
        - 10.201.7.209:15672/api/nodes   
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: 10.201.5.197:9115
My black_exporter config.yml:

modules:
  http_2rabbitmq_brainSplit:
    prober: http
    timeout: 10s
    http:
      valid_http_versions: ["HTTP/1.1", "HTTP/2"]
      valid_status_codes: []  
      method: GET
      headers:
        Accept-Language: zh-CN,zh;q=0.9
      no_follow_redirects: false
      fail_if_ssl: false
      fail_if_not_ssl: false
      fail_if_body_not_matches_regexp:
      - '\"partitions\":\[\s+\]'
如果主体不匹配regexp,则我期望失败的regexp匹配结果。 我配置错误了吗