小编Pri*_*deb的帖子

如何使用 blackbox 导出器监控 tcp 端点的 SSL 证书

我需要监控 tcp 端点的证书过期。

我尝试配置黑盒导出器来监视 tcp 端点。但不幸的是未能取得应有的结果。

我们使用 blackbox 导出器来监控 https 端点的 ssl 证书,并且它工作得非常好。然而,我们希望 TCP 端点有类似的东西。

黑盒出口商:

modules:
  http_2xx:
    prober: http
    timeout: 70s
    http:
      method: GET
      preferred_ip_protocol: "ip4"
      tls_config:
        insecure_skip_verify: true

  http_OpenAPI_2xx:
    prober: http
    timeout: 70s
    http:
      method: GET
      preferred_ip_protocol: "ip4"
      tls_config:
        insecure_skip_verify: true
      fail_if_not_matches_regexp:
       - "HTTP/1.1 200 OK*"

  http_post_2xx:
    prober: http
    http:
      method: POST
  tcp_connect:
    prober: tcp
    timeout: 5s
    tcp:
     tls: false
  pop3s_banner:
    prober: tcp
    tcp:
      query_response:
      - expect: "^+OK"
      tls: false
      tls_config:
        insecure_skip_verify: true
  ssh_banner:
    prober: tcp
    tcp:
      query_response: …
Run Code Online (Sandbox Code Playgroud)

prometheus prometheus-blackbox-exporter

5
推荐指数
1
解决办法
7716
查看次数